What's the best way get text formatting/pretty printing for HTML5 in Vim?
I just tried HTML Tidy (from Ubuntu 12.04 repo) and by default it seems to not recognize HTML5 tags like Header, Footer, Article, Section, and tries to throw them out. I don't see an obvious switch or config setting to fix this.
Is there a better option? I'd be happy with just being able to batch fix indentations, anything beyond that is gravy.
You may want to have a look at installing a syntax file or plugin for Vim geared towards HTML5. Such as this by othree. Afterwards you should be able to gg=G to format your HTML.
While we're on the topic, you may want to install emmet.vim a handy dandy zencoding like plugin for Vim which will make writing any HTML much quicker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With