How do I make sure that my keymap only works in insert mode and nowhere else. Now it also becomes active in search and I don't want this.

A secondary question I also have is: why is my keymap becoming active in denite search windows. This is regardless of whether my keymap is turned on or off.

Personally, I would like my keymap to work in INSERT mode absolutely nowhere else.


1 Answer 1


I’ve never used keymap before, but my understanding of the documentation is that you should set imsearch to 0

  • yo thanks for replying; how do i do this when the keymap is set with set keymap=.... I changed the title since I might have been a bit unclear.
    – molleweide
    Apr 13, 2020 at 8:10
  • Ah! I didn’t know about that option. I edited the answer, I hop it helps
    – Tae
    Apr 13, 2020 at 8:21
  • cool :) no, that's what is making me confused. setting imsearch to -1 has no effect. and therefore none of the options in mbyte keymap makes any sense to me. I can live with having it work this way but it annoys me a lot that i don't get how it works.
    – molleweide
    Apr 13, 2020 at 8:33
  • It is quite confusing. What about 0? vimdoc.sourceforge.net/htmldoc/options.html#'imsearch'
    – Tae
    Apr 13, 2020 at 8:42
  • 1
    hmm, now it works. i must have done something wrong earlier. I am quite sure I tried =0 just before making the post. thanks for sticking with me.
    – molleweide
    Apr 13, 2020 at 8:50

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.