Category Archives: vi
Auto format a document using vim
Posted by on July 13, 2011
To auto indent the content of a file: gg=G The above command means perform formatting from the 1st to the last line. = is the command to perform formatting, gg G says where to start and where to end. G=gg does the same thing as well. The indentation is performed based on the file type. [...]