0

Currently:

  • I have some key binding A^X^O (in insert mode) to omni-complete something
  • I have some key binding B^Ogj to temporarily do something in normal mode (in this case, move down a display line)

However, if I press ^A^B, the second ^O conflicts with the first ^O and removes the omnicompletion.

How can I modify ^A so that it exits the ^X mode?

For normal typing I'd just use <esc>gj but this is in a binding.


I did read help for i_CTRL-X and ins-completion, but I can't find any dedicated key. popupmenu-keys (^Y) only work when there's a popupmenu, in this case there isn't because there's only one completion entry.

I did find some workaround (posted as an answer below), but I may have missed some dedicated method to do it. (like ^Y in completion mode with popup)

For context, I'm typing </^X^O to omni-complete HTML tags.

0

These are some workaround:

  • <space><backspace>. Works (space is guaranteed to exit the completion mode), but doesn't seem very nice.
  • <left><right>. Should work, as long as the expansion does not expand to nothing.
  • <c-g><c-g>. This is no-op by now, but I think the behavior is not documented.
    • The above, and map <c-g><c-g> to <nop>. Does not work.
  • <c-\><c-o>i.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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