I've found several answers on how to indent multiple lines in vim, I want to know how to take a single line and indent it more than once. In effect, I want a shorter version of the following command: ">>>>>>>>>>" (That is 10 right bracket "greater-than" signs.)
press v for visual mode. use up / down arrow to highlight text. press = to indent all the lines you highlighted.
To indent the current line, or a visual block: ctrl-t, ctrl-d - indent current line forward, backwards (insert mode) visual > or < - indent block by sw (repeat with . )
Select what you want (typically with v or Shift+v) then type 5>
.
If you need to fix or repeat the same selection, use gv.
You can select the current line by pressing v
, and then type 5>
to indent the current line 5 times, the equivalent of pressing >
10 times.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With