Indenting a bunch of lines in Vim

indentation, vim

Solution

Use visual mode as Peter suggests. You can also use X>> where `X` is the number of lines you want to indent. E.g. 5>> indents five lines from current line and down.

Problem

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.

Original source

Related problems