Hallo Julien,
maybe instead of using Vim, you are better off with using a HTML
cleanup tool. The on called "tidy" is popular and available in most
Linux distributions - in Debian the package is called "tidy".
There also is an online version here:
http://valet.htmlhelp.com/tidy/
Ciao
--
Frank Barknecht Do You RjDj.me? _ ______footils.org__