sponsor Vim development Vim logo Vim Book Ad

basic Tip #668: Re-indenting sections : ={motion}

 tip karma   Rating 14/11, Viewed by 1202 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   March 2, 2004 2:28      complexity:   basic
author:   Marco Gergele      as of Vim:   5.7

It's simple and documented, but I needed some time to find it: when the right indenting (:he indenting) is
chosen, ={motion} re-indents the block. Maybe this could be mentioned in indenting.

 rate this tip  Life Changing Helpful Unfulfilling 

<< Navigate large CSV files more easily | nice window resizing >>

Additional Notes

fluke, March 2, 2004 17:23
For those confused, it means "press the equals key and then a direction key (eg k, j, arrows, etc)".  You can also press = twice to reindent the current line.  For information on tabs and spaces, see vimtip #83.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge.net Logo