ProAnswers.org

How to navigate multiple lines in Vim?

I want to indent multiple lines in vim.How I do this.
Can someone help me?

You can Use the > command. To indent 5 lines, 5>>. To mark a block of lines and indent it, Vjj> to indent 3 lines (vim only). To indent a curly-braces block, put your cursor on one of the curly braces and use >%.



If you’re copying blocks of text around and need to align the indent of a block in its new location, use ]p instead of just p. This aligns the pasted block with the surrounding text.



Also, the [shiftwidth](http://vimdoc.sourceforge.net/htmldoc/options.html#%27shiftwidth%27) setting allows you to control how many spaces to indent.