Fixing indentations in vim
To fix indentations in your code:
gg=G
- 
ggmoves the cursor to the beginning of the document - 
=is the indent command - 
Gis the modifying motion that=can take. 
Cheers.
Written by Anthony Sutardja
Related protips
2 Responses
Great stuff. I often use = in visual mode to indent only specific methods/blocks in my code. For example to indent the next 5 lines v5j=.
over 1 year ago
·
@janahrens This is the same:
=5j</code>
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Vim 
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#