Indentation



Press >> to indent current line
Press N>> to indent N lines
Press << to outdent current line
Press N<< to outdent N lines

Press == to autoindent currentline.
Press N== to autoindent N lines.

Select rows in Visual mode


Press > to indent the selected lines.
Press N> to indent N time.
Press < to unindent

Press = to autoindent.

As vim looses the visual selection we need a solution to allow us to indent more than once. Press '.' to repeate the previous action to further indent or press 'u' to undo the extra indentation. Alternatively one can map keys to keep the selection after indentation. Indentation commands