Reformat or fix the indentation of an entire file in vim

Tyler Tyler (258)
Total time: 2 minutes 

This short guide will help you reformat or fix the indentation of an entire file in Vim -- all at once!

Posted in these interests:

vim
PRIMARY
15 subscribers
gg=G

"=" is the indent command and it can takes motions. So "gg" means start at the beginning of the file and "G" means finish at the end.