I want to bring some magic to my configuration but it fails to work because it seems vim refuses to imap to a key in main keyboard. For example:

imap a bcd

I know most of time that's insane, but i have use case for that. Is there any switch for that so that i can turn this off?

here is my vim version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:36:07)
  • What do you mean by "refuse"? What happens exactly?
    – romainl
    Jul 29 '15 at 7:23
  • @romainl just an a gets input in my example.
    – Jason Hu
    Jul 29 '15 at 11:57

I found the reason. I have set paste in my .vimrc, and according to the doc (:h paste) this option disable mappings in insert mode:

When the 'paste' option is switched on (also when it was already on): mapping in Insert mode and Command-line mode is disabled

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.