TIL: prettifying XML files in Vim
Had to work with some machine generated XML files.
To make them more readable, I looked for a way to format and indent them in Vim.
There are many tools for this, I stumbled upon xmllint which also validates the XML.
This can be useful, but restricts it to formatting valid XML files only.
:%!xmllint --format %