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
gg=G
You need to enable loading of indentation files for specific filetypes. Change this line in your .vimrc...
.vimrc
filetype plugin on
..to this:
filetype plugin indent on
...then restart Vim and try again.
See :help filetype-indent-on for more details.
:help filetype-indent-on