Nate Eagle

Front-End Developer

Fix indentation in Vim with =

Want to correctly indent the line you’re on? ==
Want to do the whole file? gg=G

This is particularly useful if you’ve recently been converted to two-space indentation for JavaScript files and all your files use four-space indentation.

More info.