Is there a way to indent a selection of lines in Vim, like we have in text editors where we select a bunch of lines and press tab (or shift tab) to indent/unindent the selected lines?
I am talking about general indentation and not related to code indentation.
You can select a set of lines with visual line mode (via Shift + V), and then type
>
and, to dedent,
<
You can also add numeric arguments. Find out you didn't indent enough? Hit gv to re-select your previous selection.
While typing in normal mode, try out Ctrl + T or Ctrl + D to indent or dedent.
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