Thursday, August 4, 2011

auto-indent an entire source code file in VI (vim, gvim)

gg=G


=, the indent command can take motions. So, gg to get the start of the file, = to indent, G to the end of the file, gg=G.

http://stackoverflow.com/questions/506075/how-do-i-fix-the-indentation-of-an-entire-file-in-vi

Followers