问题描述
在 Vim 中处于可视块模式(按 ctrl-V)时如何插入?
How can you insert when you are in visual block mode (by pressing ctrl-V) in Vim?
推荐答案
试试这个
选择一段文本后,按+或大写.
After selecting a block of text, press + or capital .
小写 不起作用.
然后输入您想要的内容,最后将其应用到所有行,按 两次.
Then type the things you want and finally to apply it to all lines, press twice.
如果这不起作用...
检查是否在您的 Vim 版本中启用了 +visualextra
.
Check if you have +visualextra
enabled in your version of Vim.
您可以通过输入 :ver
并滚动浏览功能列表来执行此操作.(您可能希望将其复制并粘贴到缓冲区中并进行增量搜索,因为格式很奇怪.)
You can do this by typing in :ver
and scrolling through the list of features. (You might want to copy and paste it into a buffer and do incremental search because the format is odd.)
启用它超出了本问题的范围,但我相信您可以在某处找到它.
Enabling it is outside the scope of this question but I'm sure you can find it somewhere.
这篇关于Vim:如何在可视块模式下插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!