问题描述
在我的vimrc中,我已重新映射jk以使用imap进行转义.
In my vimrc, I've remapped jk to escape using imap.
当我使用jk时出现问题;它不会逃脱,只会回显< Esc>
.
The problem emerges when I use jk; it doesn't escape, it only echoes out <Esc>
.
这是问题的条目: imap jk< Esc>
使我也在fedora中使用vim-X11也很重要.
It's also a good point to make that I'm also using vim-X11 in fedora.
推荐答案
看起来你的 'cpoptions'
设置包含 <
;那么,无法识别诸如< Esc>
之类的特殊键代码.
It looks like your 'cpoptions'
settings contains <
; then, special key codes like <Esc>
are not recognized.
找出通过什么设置
:verbose set cpo?
或重新编写映射以使用文字Escape字符;通过 + 输入;它应该在缓冲区中显示为 ^ [
.
or re-write the mapping to use a literal Escape character; enter it via + ; it should appear as ^[
in the buffer.
PS:尽管不相关,但除非需要重新映射,否则通常应使用:inoremap
.
PS: Though not related, you should usually use :inoremap
unless remapping is required.
这篇关于Vim imap jk< Esc>不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!