Skip to content

Commit

Permalink
修复新版本YCM路径变更导致配置文件失效无法补全的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken committed Jun 1, 2014
1 parent 86829af commit 07e8a3d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,17 @@ let g:ycm_complete_in_strings = 1 "在字符串输入中也能补全
let g:ycm_collect_identifiers_from_comments_and_strings = 1 "注释和字符串中的文字也会被收入补全
"let g:ycm_seed_identifiers_with_syntax=1 "语言关键字补全, 不过python关键字都很短,所以,需要的自己打开
let g:ycm_collect_identifiers_from_tags_files = 1
" 引入,可以补全系统,以及python的第三方包
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py"
" 引入,可以补全系统,以及python的第三方包 针对新老版本YCM做了兼容
" old version
if !empty(glob("~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py"))
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py"
endif
" new version
if !empty(glob("~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"))
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"
endif


" 直接触发自动补全
let g:ycm_key_invoke_completion = '<C-Space>'
" 黑名单,不启用
Expand Down

0 comments on commit 07e8a3d

Please sign in to comment.