From f449405e273797461a35b9bcd4f155939831175e Mon Sep 17 00:00:00 2001 From: wklken Date: Fri, 3 Oct 2014 11:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0,jd=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E5=87=BD=E6=95=B0=E5=AE=9A=E4=B9=89=E5=A4=84,?= =?UTF-8?q?=E5=88=86=E5=B1=8F=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + vimrc.bundles | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b2ab2fde..59f567be1 100644 --- a/README.md +++ b/README.md @@ -370,6 +370,7 @@ molokai主题 ctrl+n 选择下一个补全 ctrl+p 选择上一个补全 回车 选中 + ,jd 跳转到函数定义, 分屏打开一个buffer(非常有用) ,gd 跳到声明位置, 仅 filetypes: c, cpp, objc, objcpp, python 有效 演示(官方截图) diff --git a/vimrc.bundles b/vimrc.bundles index 5a71c1ba8..0e42fa0f2 100644 --- a/vimrc.bundles +++ b/vimrc.bundles @@ -55,9 +55,15 @@ let g:ycm_complete_in_comments = 1 "在注释输入中也能补全 let g:ycm_complete_in_strings = 1 "在字符串输入中也能补全 let g:ycm_use_ultisnips_completer = 1 "提示UltiSnips 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 + +" 跳转到定义处, 分屏打开 +let g:ycm_goto_buffer_command = 'horizontal-split' +nnoremap jd :YcmCompleter GoToDefinition + +"let g:ycm_seed_identifiers_with_syntax=1 "语言关键字补全, 不过python关键字都很短,所以,需要的自己打开 + " 引入,可以补全系统,以及python的第三方包 针对新老版本YCM做了兼容 " old version if !empty(glob("~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py")) @@ -68,7 +74,7 @@ if !empty(glob("~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_ let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py" endif -" 直接触发自动补全 +" 直接触发自动补全 insert模式下 let g:ycm_key_invoke_completion = '' " 黑名单,不启用 let g:ycm_filetype_blacklist = {