Vim Vundle YouCompleteMe

/**************************************************************************************
 *                            Vim Vundle YouCompleteMe 
 * 说明:
 *     之前在Vim中安装YCM出了问题,装不了,这次花点时间再折腾一下,可以了。
 *                 
 *                                                  2016-8-14 深圳 南山平山村 曾剑锋
 *************************************************************************************/
Vim+Vundle+YouCompleteMe

一. 参考文档:
    1. YouCompleteMe
        https://github.com/Valloric/YouCompleteMe
    2. Vim+Vundle+YouCompleteMe
        http://blog.csdn.net/vintage_1/article/details/21557277
    3. When I'm installing the YouCompleteMe plug-in for MacVim, it shows 'Please install Cmake and retry'. What should I do next?
        https://www.quora.com/When-Im-installing-the-YouCompleteMe-plug-in-for-MacVim-it-shows-Please-install-Cmake-and-retry-What-should-I-do-next

二. vim插件安装:
    1. .vimrc添加Plugin 'Valloric/YouCompleteMe'
    2. vim中执行:PluginInstall
    3. 等待安装完成
    4. aplex@aplex:~/.vim/bundle/YouCompleteMe$ ./install.py --clang-completer 
    5. aplex@aplex:~/.vim/bundle/YouCompleteMe$ cp ./third_party/ycmd/cpp/ycm/.ycm_extra_conf.py ~

三. YCM .vimrc配置:
    """"""""""""""""""""""""""""""
    " ycm setting
    """"""""""""""""""""""""""""""
    let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py'
    let g:ycm_collect_identifiers_from_tag_files = 1
    let g:ycm_seed_identifiers_with_syntax = 1
    let g:ycm_confirm_extra_conf=0
    let g:ycm_key_invoke_completion = '<C-/>'
    nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>

 

posted on 2016-08-14 08:25  zengjf  阅读(827)  评论(0编辑  收藏  举报

导航