Some default mappings can be set to empty strings
This allows the user to not have a mapping. Also, showing a detailed diagnostic is now possible through a new command. Fixes #64.
This commit is contained in:
parent
012102300d
commit
7cf179e2b8
12
README.md
12
README.md
@ -415,6 +415,11 @@ A better option would be to use Syntastic which will keep your `locationlist`
|
||||
up to date automatically and will also show error/warning notifications in Vim's
|
||||
gutter.
|
||||
|
||||
### The `YcmShowDetailedDiagnostic` command
|
||||
|
||||
This command shows the full diagnostic text when the user's cursor is on the
|
||||
line with the diagnostic.
|
||||
|
||||
### The `YcmDebugInfo` command
|
||||
|
||||
This will print out various debug information for the current file. Useful to
|
||||
@ -579,6 +584,8 @@ default mapping will probably only work in GUI Vim (Gvim or MacVim) and not in
|
||||
plain console Vim because the terminal usually does not forward modifier key
|
||||
combinations to Vim.
|
||||
|
||||
Setting this option to an empty string will make sure no mapping is created.
|
||||
|
||||
Default: `<C-Space>`
|
||||
|
||||
let g:ycm_key_invoke_completion = '<C-Space>'
|
||||
@ -586,7 +593,10 @@ Default: `<C-Space>`
|
||||
### The `g:ycm_key_detailed_diagnostics` option
|
||||
|
||||
This option controls the key mapping used to show the full diagnostic text when
|
||||
the user's cursor is on the line with the diagnostic.
|
||||
the user's cursor is on the line with the diagnostic. It basically calls
|
||||
`:YcmShowDetailedDiagnostic`.
|
||||
|
||||
Setting this option to an empty string will make sure no mapping is created.
|
||||
|
||||
Default: `<leader>d`
|
||||
|
||||
|
@ -74,12 +74,16 @@ function! youcompleteme#Enable()
|
||||
exe 'inoremap <expr>' . g:ycm_key_previous_completion .
|
||||
\ ' pumvisible() ? "\<C-p>" : "\' . g:ycm_key_previous_completion .'"'
|
||||
|
||||
if strlen(g:ycm_key_invoke_completion)
|
||||
" <c-x><c-o> trigger omni completion, <c-p> deselects the first completion
|
||||
" candidate that vim selects by default
|
||||
exe 'inoremap <unique> ' . g:ycm_key_invoke_completion . ' <C-X><C-O><C-P>'
|
||||
endif
|
||||
|
||||
if strlen(g:ycm_key_detailed_diagnostics)
|
||||
exe 'nnoremap <unique> ' . g:ycm_key_detailed_diagnostics .
|
||||
\ ' :call <sid>ShowDetailedDiagnostic()<cr>'
|
||||
\ ' :YcmShowDetailedDiagnostic<cr>'
|
||||
endif
|
||||
|
||||
py import sys
|
||||
py import vim
|
||||
@ -404,6 +408,8 @@ function! s:ShowDetailedDiagnostic()
|
||||
py ycm_state.ShowDetailedDiagnostic()
|
||||
endfunction
|
||||
|
||||
command! YcmShowDetailedDiagnostic call s:ShowDetailedDiagnostic()
|
||||
|
||||
|
||||
" This is what Syntastic calls indirectly when it decides an auto-check is
|
||||
" required (currently that's on buffer save) OR when the SyntasticCheck command
|
||||
|
Loading…
Reference in New Issue
Block a user