I added the following key mappings:
inoremap <silent> <Up> <C-o>gk
inoremap <silent> <Down> <C-o>gj
The goal was that j
/k
would still work the way that I was used to, but that I could use the arrow keys as an alternative to more easily navigate wrapped lines. Now I've discovered that these mappings interfere with omnicompletion. If I hit an arrow key, <C-o>
ends the omnicomplete, and gj
(or gk
) is inserted at the cursor position.
I found an mailing list exchange from 2006 where Bram acknowledges the issue, but can't find any mention of it more recently. Is this still an unresolved issue? Is there any way to make imap bindings beginning with <C-o>
compatible with omnicompletion?