search

Home  >  Q&A  >  body text

vim key mapping failed

Operating environment:

Fedora 21 Terminal

question:

First configure imap jk <ESC> You can do it through jk<ESC>. I don’t know why it suddenly fails after using it. Press jk and directly output <ESC>.

Replenish:

imap jk <ESC> is written in the configuration file and is invalid.
I just executed :imap jk <ESC> in Normal mode and then entered Insert mode. However, it failed again after exiting vim and then entering again.
Very weird :(

过去多啦不再A梦过去多啦不再A梦2758 days ago660

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 16:41:21

    imap refers to mapping under input mode. This is the keyboard mapping at this time, which will directly input text. You should change it to nmap, or be more violent and try map

    reply
    0
  • 迷茫

    迷茫2017-05-16 16:41:21

    You can execute it :map to see what jk is mapped

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-16 16:41:21

    The most likely reason for this is that you try typing something with <ESC> 原始的意义取消掉了,你直接按 ESC.

    If it’s normal, you can try mapping imap jk <C-[>Maybe there won’t be any problems

    reply
    0
  • Cancelreply