Vim: gg=G aligns left, does not auto-indent

前端 未结 2 1267
不知归路
不知归路 2020-12-06 11:17

When I try to fix the indentation of an HTML file with gg=G, each line loses its indentation and becomes left-justified. Does anybody know what could be going o

2条回答
  •  星月不相逢
    2020-12-06 11:42

    You need to enable loading of indentation files for specific filetypes. Change this line in your .vimrc...

    filetype plugin on
    

    ..to this:

    filetype plugin indent on
    

    ...then restart Vim and try again.

    See :help filetype-indent-on for more details.

提交回复
热议问题