系统之家 - 系统光盘下载网站!

当前位置:系统之家 > 系统教程 > Linux系统Vim安装YouCompleteMe插件

Linux系统Vim如何安装YouCompleteMe插件(2)

时间:2015-09-01 14:42:37 作者:zhijie 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150901/56692.html 手机查看 评论

  进程如下,+号表示已经安装,》表示正在安装。

  。 Plugin ‘gmarik/vundle’ |~

  + Plugin ‘tpope/vim-fugitive’ |~

  + Plugin ‘Lokaltog/vim-easymotion’ |~

  + Plugin ‘tpope/vim-rails.git’ |~

  + Plugin ‘rstacruz/sparkup’ |~

  + Plugin ‘L9’ |~

  + Plugin ‘FuzzyFinder’ |~

  》 Plugin ‘git://git.wincent.com/command-|~

  t.git’ |~

  Plugin ‘file:///home/gmarik/path/to/pl|~

  ugin’ |~

  Plugin ‘Valloric/YouCompleteMe’ |~

  Helptags

  结束时有个错误,这是正常的,因为ycm需要手工编译出库文件

  Done! With errors; press l to view log

  ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need

  to compile YCM before using it. Read the docs!

  到 .vim/bundle/YouCompleteMe 下跑

  。/install.sh --clang-completer

  参数是为了支持c/c++ 的补全。

  安装完成后进行一些简单的配置就可以使用。

  YouCompleteMe 的补全配置文件在/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py,这是个隐藏文件。

  默认会使用这个文件,也可以把这个文件copy到工程的根目录中作修改,打开工程文件时会优先使用当前目录下的配置文件。

  如果找不到,会根据配置中的ycm_global_ycm_extra_conf 进行查找。

  在.vimrc 中添加

  let mapleader = ”,“ ” 这个leader就映射为逗号“,”

  let g:ycm_global_ycm_extra_conf = ‘~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py’ “配置默认的ycm_extra_conf.py

  nnoremap 《leader》jd :YcmCompleter GoToDefinitionElseDeclaration《CR》 “按,jd 会跳转到定义

  let g:ycm_confirm_extra_conf=0 “打开vim时不再询问是否加载ycm_extra_conf.py配置

  let g:ycm_collect_identifiers_from_tag_files = 1 “使用ctags生成的tags文件

  以上就是Linux给Vim安装YouCompleteMe插件的方法了,YouCompleteMe插件号称Vim自动补全神器,这个插件对Vim来说相当重要。

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表系统之家立场

其他版本软件

热门教程

人气教程排行

Linux系统推荐

官方交流群 软件收录