Vim Tip: Easy Indent

Post by Nico Brailovsky @ 2009-06-14 | Permalink | Leave a comment

Editing source code means you'll be doing a lot of indenting and reindenting. There's an easy way to indent or de-indent a block, using just "<" and ">".

Using ">" without anyother command will indent that line by itself; use visual mode (Shift + V) to select several lines and indent them in one keystroke. You could also press "v%>" while sitting at the beggining of a block to indent it. The same applies to "<".

"