Now usually, vim's super-powers allow "gg=G" - which automagically indents code, according to the filetype syntax.
Here's what you need to do in order to use that for XML:
NOTE: These changes to are not permanent in vim. They only work for the current session.
Code: Select all
:filetype plugin indent on :set nocompatible :set filetype=xml