I installed deoplete and it works for me, however by default it opens a pop-up window whenever you type something. This is not desirable. I want pop-up to only show when I hit Ctrl+N. So I disable autocompletion:
let b:deoplete_disable_auto_complete = 1
But that makes Ctrl+N behave as it did before deoplete, that is use all words in the buffer as completion source.
I also tried adding the code from the docs, to no avail:
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ deoplete#mappings#manual_complete()
function! s:check_back_space() abort "{{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction"}}}
It remaps the Tab key, but not Ctrl+N. Is it possible to show Deoplete manual completion by pressing Ctrl+N?
I admit I'm slightly puzzled as to the exact behaviour you're looking for, but it seems like you just need to bind Ctrl+N? If so:
let g:deoplete#enable_at_startup = 1
let g:deoplete#disable_auto_complete = 1
inoremap <expr> <C-n> deoplete#manual_complete()
works ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With