In this tutorial we are going to format an XML via the VIM tool
First, highlight the XML you want to format.
Then, in normal mode, type
xmllint --format -
Your command-line at the bottom will look like this:
:'<,'>!xmllint --format -
Then hit enter.
If you are using vim on windows you will need to make xmllint available to the console. I download this application
and I updated my windows %PATH% variable to point to it.