I'm really fond of this idea of using Ctrl-V (Ctrl-Q in windows) to modify a visual block. The technique is explained here: In Vim how do I effectively insert the same characters across multiple lines?
由于某种原因,这在 VIM 7.2.411 中对我不起作用。
I press Ctrl-V, it says visual block, and I press J several times to expand my selection. Then I press Shift-I to insert, place my text, and when I press Esc, it has only modified the top line of the selection. I've had a hard time figuring out why this isn't working on my linux box. The same technique works great for gvim in windows.
什么可能会阻止此工作,或者我应该尝试什么不同的方法?
问题的根源是缺乏编译支持(感谢我的共享托管提供商)。对于遇到类似问题的其他人,请检查 vim 中的 +visualextra 选项。您可以使用以下命令从正常模式进行检查:
:echo has('visualextra')
如果是,它将返回“1”。否则你可以看看使用:
:version
或者通过从命令行调用 --version 选项:
vim --version | grep visualextra
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)