Category Archives: vi

Auto format a document using vim

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. [...]

Follow

Get every new post delivered to your Inbox.