vim格式化代码

来源:互联网 发布:网络棋牌游戏作弊教程 编辑:程序博客网 时间:2024/04/29 12:47

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

For more information, read

    :help gg
    :help =
    :help G
    :help 'formatprg'
    :help C-indenting