vim之YCM配置

BundleInstall,默认会出现错误

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!

最简单解决方式:

cd ~/.vim/bundle/YouCompleteMe 
./install.sh --clang-completer

另外,vimConfig/plugin/youCompleteMe-setting.vim

1 """"""""""""YCM""""""""""""""""""""
2 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
3 let g:ycm_collect_identifiers_from_tags_files = 1
4 let g:ycm_seed_identifiers_with_syntax = 1
5 let g:ycm_confirm_extra_conf = 0

添加自定义头文件路径

修改~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py

在 “flags = [ ” 后面加上两行:

'-isystem',
'你的路径',

注意,路径不能用~/aaaa,要全路径,否则找不到。

原文地址:https://www.cnblogs.com/ziyouchutuwenwu/p/3488193.html