In the example below, how do I use <tab> to select HttpResponse the item instead of <enter>? I'd like to make this change permanent.

This is using Kite within vim in case it matters.

enter image description here

  • 3
    Have a look at :h popupmenu-keys. I think there it explains how to map something down there.
    – Quasímodo
    Commented Feb 21, 2021 at 12:29

1 Answer 1


You need this map:

inoremap <expr> <TAB> pumvisible() ? "<C-y>" : "<TAB>"

If PUM (complete menu) is visible, then execute <C-y> (which selects an item), otherwise, do a normal tab.

  • 1
    Note that the current official command to do this (according to :help coc-completion) is: inoremap <expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
    – RononDex
    Commented Sep 15, 2022 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.