YouCompleteMe是一個google開源的vim自動補全插件
源地址 https://github.com/Valloric/YouCompleteMepython
Plugin 'Valloric/YouCompleteMe'
進入vim,命令行模式輸入git
:PluginInstall
若是不能正常安裝,則需進入~/vim/bundle,執行github
git clone --recursive https://github.com/Valloric/YouCompleteMe.git
可能還須要多執行幾回才能把他完整clone下來vim
sudo apt-get install cmake
sudo apt-get install python-dev
sudo apt-get install python3-dev
若是須要C家族語言支持就google
cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer
若是不須要C家族語言支持就插件
cd ~/.vim/bundle/YouCompleteMe ./install.py
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
並在.ycm_extra_conf.py中添加須要輸入的時候查找提示的搜索路徑
好比:命令行
'isystem', '/usr/include', 'isystem', '/usr/local/include',
等。code