diff --git a/plugin/clang_complete.vim b/plugin/clang_complete.vim index 9717cb97..5f0f6aee 100644 --- a/plugin/clang_complete.vim +++ b/plugin/clang_complete.vim @@ -158,14 +158,22 @@ function! s:ClangCompleteInit() python snippetsInit() + inoremap (clang-launch-completion) LaunchCompletion() + inoremap (clang-complete-dot) CompleteDot() + inoremap (clang-complete-arrow) CompleteArrow() + inoremap (clang-complete-colon) CompleteColon() + nnoremap (clang-goto-declaration) :call GotoDeclaration(0) + nnoremap (clang-goto-declaration-in-preview) :call GotoDeclaration(1) + nnoremap (clang-jumpto-back) + if g:clang_make_default_keymappings == 1 - inoremap LaunchCompletion() - inoremap . CompleteDot() - inoremap > CompleteArrow() - inoremap : CompleteColon() - execute "nnoremap " . g:clang_jumpto_declaration_key . " :call GotoDeclaration(0)" - execute "nnoremap " . g:clang_jumpto_declaration_in_preview_key . " :call GotoDeclaration(1)" - execute "nnoremap " . g:clang_jumpto_back_key . " " + imap (clang-launch-completion) + imap . (clang-complete-dot) + imap > (clang-complete-arrow) + imap : (clang-complete-colon) + execute "nmap " . g:clang_jumpto_declaration_key . " (clang-goto-declaration)" + execute "nmap " . g:clang_jumpto_declaration_in_preview_key . " (clang-goto-declaration-in-preview)" + execute "nmap " . g:clang_jumpto_back_key . " (clang-jumpto-back)" endif " Force menuone. Without it, when there's only one completion result,