The "(insert) VISUAL
" mode can be entered by CTRL+O , v starting from insert mode. This enters visual mode, but is displayed as "(insert) VISUAL
" from within vim, and pressing Esc from this mode brings you back to insert mode, not normal mode. The "(insert) VISUAL
" mode is also entered by shifted arrowed keys from insert mode.
两个相关问题:
There does not seem to be much documentation on this special mode. Is there an easy way to search for information about it? (edit: I'm aware of what CTRL+O normally does. The interaction with visual mode seems to be special. The first paragraph was the easiest way to refer to what this mode is in the first place, as I don't know of a searchable name for it.)
你怎么写vmap
映射可靠吗?也就是说,是否有一种一致的方式来离开视觉模式并最终进入正常模式?或者始终处于插入模式?
In insert mode, <C-o>
允许你执行normal无需离开模式命令insert模式。 Vim 尝试用以下方式表示新状态(insert)
。既然你现在暂时处于normal模式,击中v
让你进入visual模式,Vim 再次尝试用以下命令指示新状态(insert) VISUAL
。 Vim 处于这种状态只是因为命令序列you正如其他人指出的那样,该行为已被记录下来。在这一点上,这是正常的并且是预期的<Esc>
让你回到insert模式,因为那是您的原始模式。
比我更深入了解 Vim 的人也许可以告诉你是否有可靠的方法可以结束normal
from insert
-> (normal)
-> visual
但我想说,整个想法对我来说听起来很可疑。
正确的用法是:
- 做事normal mode
- enter insert“插入”某些东西的模式
- exit insert返回模式normal mode
- 做更多的事情normal mode
- enter visual mode
- 做事visual mode
- exit visual返回模式normal mode
- etc.
基本上,你不应该超过一<Esc>
远离normal mode.
我无法想象使用的场景v
after <C-o>
有任何意义。
使用 Vim 的最佳和首选方式是远离insert尽可能多的模式。使用<C-o>
以避免离开insert模式是一个非常糟糕的策略。我不知道你是否这样做,但如果你这样做,你应该尽快重新考虑这种方法。
但我怀疑你正在尝试做一些你认为我们不需要知道的事情。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)