User login

indent

Indent lines in Vim

To indent a set of eight lines in vim, from the first one, in normal (esc) mode:

8>>

To indent a curly braces block, go to a curly brace and:

>%

To mark and indent (using 'm' as the marking letter, the first m is the marking command):

Enter mm at the top of block to indent, go down to the end of what needs to be indented, and type >'m

Syndicate content