diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index a0375485..0349cfb5 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -113,13 +113,13 @@ function! s:SetUpKeyMappings() \ ' pumvisible() ? "\" : "\' . key .'"' endfor - if strlen(g:ycm_key_invoke_completion) + if !empty( g:ycm_key_invoke_completion ) " trigger omni completion, deselects the first completion " candidate that vim selects by default exe 'inoremap ' . g:ycm_key_invoke_completion . ' ' endif - if strlen(g:ycm_key_detailed_diagnostics) + if !empty( g:ycm_key_detailed_diagnostics ) exe 'nnoremap ' . g:ycm_key_detailed_diagnostics . \ ' :YcmShowDetailedDiagnostic' endif