parent
90dc16bb99
commit
3f1b5c9283
@ -523,6 +523,15 @@ Default: `1`
|
||||
|
||||
let g:ycm_allow_changing_updatetime = 1
|
||||
|
||||
### The `g:ycm_complete_in_comments_and_strings` option
|
||||
|
||||
When this option is set to `1`, YCM will show the completion menu even when
|
||||
typing inside strings and comments.
|
||||
|
||||
Default: `0`
|
||||
|
||||
let g:ycm_complete_in_comments_and_strings = 0
|
||||
|
||||
### The `g:ycm_add_preview_to_completeopt` option
|
||||
|
||||
When this option is set to `1`, YCM will add the `preview` string to Vim's
|
||||
|
@ -331,6 +331,10 @@ endfunction
|
||||
|
||||
|
||||
function! s:InsideCommentOrString()
|
||||
if g:ycm_complete_in_comments_and_strings
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Has to be col('.') -1 because col('.') doesn't exist at this point. We are
|
||||
" in insert mode when this func is called.
|
||||
let syntax_group = synIDattr( synIDtrans( synID( line( '.' ), col( '.' ) - 1, 1 ) ), 'name')
|
||||
|
@ -74,6 +74,9 @@ let g:ycm_allow_changing_updatetime =
|
||||
let g:ycm_add_preview_to_completeopt =
|
||||
\ get( g:, 'ycm_add_preview_to_completeopt', 0 )
|
||||
|
||||
let g:ycm_complete_in_comments_and_strings =
|
||||
\ get( g:, 'ycm_complete_in_comments_and_strings', 0 )
|
||||
|
||||
let g:ycm_autoclose_preview_window_after_completion =
|
||||
\ get( g:, 'ycm_autoclose_preview_window_after_completion', 0 )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user