In Vim, what is the command to correct the indentation of all the lines?
Often times I\'ll copy and paste code into a remote terminal and have the whole thing messed
For XML files, I use this command
:1,$!xmllint --format --recover - 2>/dev/null
You need to have xmllint installed (package libxml2-utils)
(Source : http://ku1ik.com/2011/09/08/formatting-xml-in-vim-with-indent-command.html )