码迷,mamicode.com
首页 > 其他好文 > 详细

centos7下yourcompleteme安装

时间:2019-07-13 13:51:46      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:properly   修改   centos7   search   out   vundle   system   command   format   

以前装过一回,没成功,现在再来一次

 

yourcompleteme git

https://github.com/ycm-core/YouCompleteMe#installation

 

检查软件版本

vim需>=7.4.1578
vim --version

python需>=2
python --version

 

安装Vundle

git地址:https://github.com/VundleVim/Vundle.vim#about

下载源码:git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

vi .vimrc  将下面内容按自己环境修改贴进去

Put this at the top of your .vimrc to use Vundle. Remove plugins you don‘t need, they are for illustration purposes.

技术图片
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

" 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
View Code

vundle安装插件过程

技术图片
1.vim .vimrc将自己需要的插件加入到call vundle#begin() 跟 call vundle#end()之间

例:
call vundle#begin()
Plugin Valloric/YouCompleteMe
call vundle#end()
保存退出

然后输入
vim
::PluginInstall
View Code

 

vim 安装yourcompleteme

在.vimrc加入Plugin ‘Valloric/YouCompleteMe‘

下载源码:git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe

进入源码目录:cd ~/.vim/bundle/YouCompleteMe

安装第三方包:git submodule update --init --recursive

其中third_party/go/src/golang.org/x/tools‘ failed因为部分包在go官网会被墙了,

解决参见:https://www.jianshu.com/p/6fe61053c8aa?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

安装:python2 install.py --clang-completer --system-libclang(遇到环境问题一个一个解决)

以下是我缺少的

技术图片
ERROR: Unable to find executable cmake. CMake is required to build ycmd
yum install cmake -y
View Code

 

centos7下yourcompleteme安装

标签:properly   修改   centos7   search   out   vundle   system   command   format   

原文地址:https://www.cnblogs.com/lurenjia1994/p/11180102.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!