opensuse42.2vim安装YouCompleteMe

1 篇文章 0 订阅
1 篇文章 0 订阅

原文:https://github.com/Valloric/YouCompleteMe#full-installation-guide
安装cmake git
sudo zypper install cmake git
删除vim
sudo zypper remove vim
创建一个文件夹放vim源码
mkdir software
mkdir software
使用git下载源码
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
            --enable-multibyte \
            --enable-rubyinterp=yes \
            --enable-pythoninterp=yes \
            --with-python-config-dir=/usr/lib64/python2.7/config \
            --enable-python3interp=yes \
            --with-python3-config-dir=/usr/lib64/python3.4/config3.4m \
            --enable-perlinterp=yes \
            --enable-luainterp=yes \
            --enable-gui=gtk2 \
            --enable-cscope \
            --prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim80
sudo make install
到此vim安装成功
安装vim插件管理工具Vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
编辑.vimrc文件
call vundle#begin()和call vundle#end()中放自己的插件
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" 在这里放YouCompleteMe插件
plugin 'Valloric/YouCompleteMe'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
cd ~/.vim/bundle
git下载YouCompleteMe
git clone https://github.com/Valloric/YouCompleteMe.git
检查完整性(在 `~/.vim/bundle/YouCompleteMe` 目录下)
$ git submodule update --init --recursive
安装YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
./install.py
编译安装clang和llvm
 
 
  1. Get the required tools.
  2. Check out LLVM:
    • Change directory to where you want the llvm directory placed.
    • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
  3. Check out Clang:
    • cd llvm/tools
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    • cd ../..
  4. Check out extra Clang tools: (optional)
    • cd llvm/tools/clang/tools
    • svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
    • cd ../../../..
  5. Check out Compiler-RT (optional):
    • cd llvm/projects
    • svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
    • cd ../..
  6. Check out libcxx: (only required to build and run Compiler-RT tests on OS X, optional otherwise)
    • cd llvm/projects
    • svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
    • cd ../..
  7. Build LLVM and Clang:
    • mkdir build (in-tree build is not supported)
    • cd build
    • cmake -G "Unix Makefiles" ../llvm
    • make
    • This builds both LLVM and Clang for debug mode.
    • Note: For subsequent Clang development, you can just run make clang.
    • CMake allows you to generate project files for several IDEs: Xcode, Eclipse CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3. For more details see Building LLVM with CMake page.
  8. If you intend to use Clang's C++ support, you may need to tell it how to find your C++ standard library headers. In general, Clang will detect the best version of libstdc++ headers available and use them - it will look both for system installations of libstdc++ as well as installations adjacent to Clang itself. If your configuration fits neither of these scenarios, you can use the -DGCC_INSTALL_PREFIX cmake option to tell Clang where the gcc containing the desired libstdc++ is installed.
  9. Try it out (assuming you add llvm/build/bin to your path):
    • clang --help
    • clang file.c -fsyntax-only (check for correctness)
    • clang file.c -S -emit-llvm -o - (print out unoptimized llvm code)
    • clang file.c -S -emit-llvm -o - -O3
    • clang file.c -S -O3 -o - (output native machine code)


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
openSUSE Leap是一种基于SUSE Linux Enterprise的发行版,它是一个稳定且可靠的操作系统。下面是openSUSE Leap的安装步骤: 1. 下载openSUSE Leap的安装镜像文件。你可以从openSUSE官方网站上找到最新版本的安装镜像文件,并选择适合你的计算机架构的版本。 2. 创建一个启动盘。你可以使用软件如Rufus或Etcher将下载的镜像文件写入USB闪存驱动器或DVD光盘。 3. 将启动盘插入计算机并启动计算机。确保在计算机启动时选择从USB或DVD启动。 4. 进入openSUSE Leap的安装程序。在启动时,你将看到一个图形化的安装程序界面。选择“Install”以开始安装过程。 5. 选择语言和键盘布局。根据你的偏好选择适当的语言和键盘布局。 6. 配置网络设置。如果你需要连接到互联网,选择适当的网络连接方式并配置网络设置。 7. 分区磁盘。在这一步中,你可以选择手动分区或使用自动分区工具。如果你不熟悉分区,建议使用自动分区工具。 8. 选择软件包。openSUSE Leap提供了多个软件包模式,如桌面环境、服务器和最小安装。选择适合你需求的软件包模式。 9. 设置用户和密码。创建一个新用户并设置密码。 10. 安装系统。确认所有设置后,点击“Install”开始安装openSUSE Leap。 11. 等待安装完成。安装过程可能需要一些时间,取决于你的计算机性能和所选择的软件包。 12. 完成安装安装完成后,你将收到一个提示,要求重新启动计算机。 13. 重新启动计算机。拔掉启动盘并重新启动计算机。 14. 进入openSUSE Leap。在重新启动后,你将看到登录界面。使用之前设置的用户名和密码登录系统。 希望以上步骤对你有所帮助!如果你有任何进一步的问题,请随时提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值