英文:
Vim nnoremap creates `n <Esc> * <<_`
问题
I understand that you want a translation of the provided text. Here it is:
由于某种原因,当我创建绑定 nnoremap <c-[> <<_
时,它会创建额外的正常模式绑定,看起来像是 n <Esc> * <<_
在 :nmap
中,这导致每次我在正常模式下按 Escape 键时都会缩进行。我没有映射 Esc 绑定,它似乎是 nnoremap <c-[> <<_
的副作用,如果我注释掉这行,奇怪的行为就消失了,如果我源化 $MYVIMRC 文件以带有注释行,它不会移除 Esc 绑定,我必须退出并打开 nvim 才能生效。您知道可能是什么原因吗?
提前感谢。
英文:
Hi for some reason when I create a binding nnoremap <c-[> <<_
it creates additional normal mode bindind which looks like n <Esc> * <<_
in :nmap
, which results in shifting lines indent every time when I press Escape key in normal mode. I did not map Esc binding it sort of commes as side effect of nnoremap <c-[> <<_
as if I comment out this line strange behaviour disappears if I source $MYVIMRC file with the commented line it does not remove the Esc binding I have to exit and open nvim in order for this to take effect. Do you know what could be causing this?
Thanks in advance.
答案1
得分: 3
<kbd>Control-[</kbd> 是 <kbd>Esc</kbd>。 请参阅 https://en.wikipedia.org/wiki/Control_character:
> 27 (escape, ESC, \e (GCC only), ^[). 引入了一个转义序列。
英文:
<kbd>Control-[</kbd> is <kbd>Esc</kbd>. See https://en.wikipedia.org/wiki/Control_character:
> 27 (escape, ESC, \e (GCC only), ^[). Introduces an escape sequence.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论