vim安裝ycm插件

ycm是個強大的vim插件,包括自動補全,報錯功能。linux

1,安裝vim的插件管理器Vundle(只須要下載到正確位置便可使用)。github的Vundle地址:https://github.com/VundleVim/Vundle.vim.gitgit

2,下載ycm插件。在  ~/.vim/bundle下執行 git clone https://github.com/Valloric/YouCompleteMe.gitgithub

3,   下載clang包:apt-get install llvm-3.9 clang-3.9 libclang-3.9-dev libboost-all-dev
vim

4,編譯ycm. 建立目錄 ~/.ycm_build:ui

   cd ~/.ycm_build
spa

  cmake -G "Unix Makefiles" -DUSE_SYSTEM_BOOST=ON -DEXTERNAL_LIBCLANG_PATH=/usr/lib/x86_64-linux-gnu/libclang-3.9.so . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp插件

5,  在工程項目下配置ycm配置。get

  複製 .ycm_extra_conf 到當前目錄,flags裏添加兩行:cmd

  ‘-isystem'string

  '../include'

  來包含項目的頭文件。

相關文章
相關標籤/搜索