Skip to content

Commit 3be0402

Browse files
committed
Making PrintType non script function.
1 parent 46243a0 commit 3be0402

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/clang_complete.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ Default: 0
273273
Set the key used to print the type of the identifier under cursor.
274274
If cursor is on an enum, then the value of that enum is also printed.
275275
Defaut: "zp"
276+
Note: You can call ClangPrintType() vim function to print this information.
276277

277278
*clang_complete-jumpto_declaration_key*
278279
*g:clang_jumpto_declaration_key*

plugin/clang_complete.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function! s:ClangCompleteInit()
195195
inoremap <expr> <buffer> . <SID>CompleteDot()
196196
inoremap <expr> <buffer> > <SID>CompleteArrow()
197197
inoremap <expr> <buffer> : <SID>CompleteColon()
198-
execute "nnoremap <buffer> <silent> " . g:clang_print_type_key . " :call <SID>PrintType()<CR><Esc>"
198+
execute "nnoremap <buffer> <silent> " . g:clang_print_type_key . " :call ClangPrintType()<CR><Esc>"
199199
execute "nnoremap <buffer> <silent> " . g:clang_jumpto_declaration_key . " :call <SID>GotoDeclaration(0)<CR><Esc>"
200200
execute "nnoremap <buffer> <silent> " . g:clang_jumpto_declaration_in_preview_key . " :call <SID>GotoDeclaration(1)<CR><Esc>"
201201
execute "nnoremap <buffer> <silent> " . g:clang_jumpto_back_key . " <C-O>"
@@ -639,7 +639,7 @@ function! s:CompleteColon()
639639
return ':' . s:LaunchCompletion()
640640
endfunction
641641

642-
function! s:PrintType()
642+
function! ClangPrintType()
643643
execute s:py_cmd "clangGetType()"
644644
redraw
645645
echom b:clang_type

0 commit comments

Comments
 (0)