文章作者:姜南(Slyar) 文章来源:Slyar Home (www.slyar.com) 转载请注明,谢谢合作。
gg=G 就可以了,具体见FAQ
How do I format/indent an entire file?
You can format/indent an entire file using the gg=G command, where
gg – Goto the beginning of the file
= – apply indentation
G – till end of file
转载请注明:Slyar Home » Vim FAQ — 自动缩进代码