Closed dannyalan closed 3 years ago
agreed. in vim, i am using snipmate and was trying to close the autocomplete window for tabnine, so that i can fire the snipmate snippets (template code) when i needed to....but now, i can't do that (unless i hit 'ESC' and 'a' keys to exit and re-enter insert mode, which makes the autocomplete window goes away, but the defaults the purpose as it is too many keystrokes to have the benefits)
You can close the window by C-e key.
I suppose this can be done by following function (but doesn't work in my environment):
function! TriggerYCM()
if g:loaded_youcompleteme == 1
let g:loaded_youcompleteme = 0
else
let g:loaded_youcompleteme = 1
endif
endfunction
map <M-j> :call TriggerYCM()<CR>
so, I've using filetype
to specific enable/disable :
if !(&filetype == 'vim') " if index( ['vim'], &filetype) == -1
let g:loaded_youcompleteme = 1
endif
or
let g:ycm_filetype_blacklist = {
\ 'vim' : 1 ,
\ 'vimshell': 1 ,
\ 'vimwiki': 1,
\ }
let g:ycm_filetype_specific_completion_to_disable = {
\ 'gitcommit': 1
\ }
or
Issue originally and incorrectly opened against https://github.com/zxqfl/TabNine/issues/59
Firstly, cracking plugin! I use this in vim and it has transformed the way in which I develop! Nice one!
This issue is to recognise the lack of a keyboard shortcut (I use Vim 8) to close the auto complete window. In Visual Studio products, the shortcut is (esc) although, this takes me out of Insert mode and even at that, the auto complete window still does not close until I press any other key.
The ability to close or hide the auto complete window would allow me entire visibility of the code I am editing again so I can gently stroke my beard and think carefully of my next bold code change!