Re:Staying the hell out of insert mode (vi)
by billybob on Monday April 26, 2010 @05:00PM
(#1296035)
Indenting? Heck yes. '=' will indent for you. You just have to give it a movement.
=j means 'indent this line and the next'
=% means 'indent to the matching brace'
=/foo mean 'indent to the next occurrence of foo'
1G=G means 'go to the first line and indent until the last one'
If you want specific rules for indenting file types, you can put stuff in your .vim/indent/ folder to define them
[ Parent
| on HN ]
There are no comments on this comment yet.