您的位置:首页 > 编程语言

YouCompleteMe代码自动补全

2016-04-13 13:47 225 查看
在vim中安装YouCompleteMe插件,可以做出类似IDE的补全效果:



很方便。

安装步骤可以参考这里:

http://www.alexeyshmalko.com/2014/youcompleteme-ultimate-autocomplete-plugin-for-vim/

基本上就是如下几个步骤:
cd ~/.vim/bundle
git clone https://github.com/Valloric/YouCompleteMe.git cd YouCompleteMe
git submodule update --init --recursive
./install.sh --clang-completer

需要在vim中配置下模板路径:

let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"

模本内容可用下面这个:


https://github.com/rasendubi/dotfiles/blob/master/.vim/.ycm_extra_conf.py

安装过程需要注意几点:

1、vim一定要7.3或者以上的版本,如果没有直接在jumbo上安装

2、下载后git代码后, install.sh 安装会提示已经过期,可以改用install.py安装
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: