This only works if you have the filetype plugin and indent on. To have these enabled edit the ~/,vimrc file and add the following lines:
filetype plugin on filetype indent on
only after you add those lines to the .vimrc file will the gg=G automatically indent files based on their file type.
This only works if you have the filetype plugin and indent on. To have these enabled edit the ~/,vimrc file and add the following lines:
only after you add those lines to the .vimrc file will the gg=G automatically indent files based on their file type.