Open a new file with
vim -Nu NONE and insert the following text (
| is to indicate the position of the cursor, in insert mode)
longline lo| longerline
Now hit Ctrl-XCtrl-N and the autocompletion list will pop up, and the first entry,
longerline will be highlighted.
If you now hit Ctrl-Y, the autocompletion list will disappear and the line will be reverted to what it was, like in the snipped above. What's happened is described at
If you hit Ctrl-Y again an
n will be inserted, and if you keep hitting it, more an more letters will appear until the second line looks like the first one. What's happening is described at
The point is that two different functions correspond to Ctrl-Y depending on whether we are in insert mode with a completion list showing up or in insert mode without a completion list showing up.
However, if now I enter
:inoremap <C-Y> <C-O><C-Y> (which I requested here), then Ctrl-Y will have this mapped effect not only when I'm in insert mode without the pum showing up, but also with the pum showing up.
Is this a bug?