What mode does vim enter when completion menu is up?
vim
Solution
The popup menu of insert mode completion candidates belongs to insert mode, there's no special submode for it. To differentiate, you have to use map expressions `:inoremap <expr>` with a condition on `pumvisible()`. E.g. to remap `j` to select the next completion candidate:
:inoremap <expr> j pumvisible() ? '<C-n>' : 'j'
Note that with this, you won't be able to type candidate names containing `j` to drill down and select from the list (which is especially useful with `:set completeopt+=longest`).
Problem
I recently changed my arrow keys to map to no-op to force myself to use vim navigation properly. When using word completion in vim a word-list of possible completions pops up. I used to navigate this by using the arrow keys, but now have to use the same mapping as the completion initiation to iterate through. When this menu pops up, does vim stay in insert mode, change to a different mode or does it enter a modified insert mode (similar to what paste-toggle does) that I can alter the `j` and `k` mappings to move through the list? If not is there a way of calling a method on pop-up open and close?