I have j/k set to scroll in the autocomplete box as posted in this question: Scrolling in vim autocomplete box with jk movement keys
Now I want to map h to close the box without completion, and l to close with completion. Both should stay in insert mode. How can I do this?
inoremap <expr> h ((pumvisible())?("\<C-e>"):("h"))
inoremap <expr> l ((pumvisible())?("\<C-y>"):("l"))
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