Skip to content

Commit

Permalink
增加,jd跳转到函数定义处,分屏打开
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken committed Oct 3, 2014
1 parent 0b0eef8 commit f449405
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ molokai主题
ctrl+n 选择下一个补全
ctrl+p 选择上一个补全
回车 选中
,jd 跳转到函数定义, 分屏打开一个buffer(非常有用)
,gd 跳到声明位置, 仅 filetypes: c, cpp, objc, objcpp, python 有效

演示(官方截图)
Expand Down
10 changes: 8 additions & 2 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -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 <leader>jd :YcmCompleter GoToDefinition<CR>

"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"))
Expand All @@ -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 = '<C-Space>'
" 黑名单,不启用
let g:ycm_filetype_blacklist = {
Expand Down

0 comments on commit f449405

Please sign in to comment.