Ubuntu 16.04 装YouCompleteMe ,实现自动补全,报错提醒

先推荐官方的 YouCompleteMe

中文 简洁的 YouCompleteMe

中文 详细的 YouCompleteMe

我自己走过的坑:

坑1.

File /home/w/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py does not exist; you probably forgot to run:
    git submodule update --init --recursive

提醒我 忘了运行这句话 ,但是运行 还是提醒 ,简直要崩溃
 

最后发现了我直接在github 下载解压的 ,编译少了很多东西。

还是要老老实实下载

$ git clone --recursive https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
$ cd   ~/.vim/bundle/YouCompleteMe/
$ python3 install.py --clang-completer  --system-libclang
 

坑2.https://www.cnblogs.com/20170722-kong/p/8046843.html

cp ~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~/.vim/

1. vim

https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

./configure --with-features=huge --enable-multibyte  --enable-rubyinterp=yes  --enable-pythoninterp=yes  --with-python-config-dir=/usr/lib/python2.7/config --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.5/config --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --prefix=/usr/local

bash: --with-python3-config-dir=/usr/lib/python3.5/config: No such file or directory

update-alternatives: error: alternative path /usr/local/bin/vim doesn't exist

update-alternatives: error: alternative /usr/local/bin/vim for editor not registered; not setting

解决:

sudo update-alternatives --config editor

sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim  0

4            /usr/local/bin/vim   0         manual mode

2. Vundle

在.vimrc 不装youcompleteme

 Plugin 'VundleVim/Vundle.vim'd
 Plugin 'tpope/vim-fugitive'
 Plugin 'git://git.wincent.com/command-t.git'
 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
 Plugin 'file:///Users/gmarik/path/to/plugin'

sudo vim +PluginInstall +qall

 +号表示已经安装,>表示正在安装。

3.youcompleteme

Clang-complete是一个为c/c++而生的代码自动完成的插件.当我们输入.->后,会给我们

http://releases.llvm.org/download.html 下载Ubuntu 16.04

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值