In many GUIs when I select a section of text and then hit the Tab or Shift+Tab button the selected section will indent in or out.
In VIM I can select a visual section and then hit the < or > key to change indenting, however once I hit the < key my selection is cleared so I am stuck selecting the section again and hitting < again. This gets really annoying when I am trying to indent something a few stops in and want visual feedback.
有没有办法在 vim 中缩进和缩进内容,同时保持当前选定的文本处于选中状态?
Is there a trick to re-map Tab and Shift+Tab so they behave in this way in visual mode?
您可以添加一个数字前缀,即。2>
缩进两个制表位。或者,您可以使用>
缩进一次,然后.
再次缩进(即使该块不再突出显示,这也有效)。如果你走得太远,u
将一次撤销一个步骤。
另一个有用的命令是gv
如果您需要应用不同的命令,可以恢复最后一个可视块。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)