Indenting entire file in Vim
Edit your ~/,vimrc file and add the following lines:
filetype plugin on
filetype indent on
On normal mode, just type:
gg=G
Written by Glauco Vinicius
Related protips
2 Responses
This only works if you have the filetype plugin and indent on. To have these enabled edit the ~/,vimrc file and add the following lines:
filetype plugin on
filetype indent on
only after you add those lines to the .vimrc file will the gg=G automatically indent files based on their file type.
over 1 year ago
·
Darrell,
I just updated my protip based on your comment.
Thank you! :)
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#