1

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)
2
  • What do you mean by "refuse"? What happens exactly?
    – romainl
    Commented Jul 29, 2015 at 7:23
  • @romainl just an a gets input in my example.
    – Jason Hu
    Commented Jul 29, 2015 at 11:57

1 Answer 1

3

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 and acknowledge you have read our privacy policy.

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