Tabbing visual selection in VIM

后端 未结 9 752
悲哀的现实
悲哀的现实 2020-12-02 18:35

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.

I

9条回答
  •  既然无缘
    2020-12-02 19:25

    You can prefix a number, ie. "2>" to indent two tab stops. Or, you can use ">" to indent once, then "." to indent again (this works even though the block is no longer highlighted). If you go too far, "u" will undo one step at a time.

    Another useful command is "gv" to restore the last visual block, if you need to apply a different command.

提交回复
热议问题