Sometimes I copy 'compressed' HTML from TEXTAREA an I get code for ex. like this:
<html><body><h1>header1</h1><p></p>
<p></p>
<div><p></p></div></body></html>
but GVim after command gg=G
indent only lines:
<html><body><h1>header1</h1><p></p>
<p></p>
<div><p></p></div></body></html>
what I need is unfold(in a sense that tags are not in one line) all tags like this:
<html>
<body>
<h1>header1</h1>
<p></p>
<p></p>
<div>
<p></p>
</div>
</body>
</html>
I have installed Syntastic plugin and newest Tidy
I try also
:!tidy -mi -html -wrap 0 %
but somehow nothing works.
:!
) starts a shell command, but it doesn't filter the buffer because it's not prefixed by a range. Does this work?::%!tidy -mi -html -wrap 0 %
, or maybe:%!tidy -mi -html -wrap 0 %:p:S
?%!tidy -mi -html -wrap 0
works, but still gives a lot of comments at the top and bottom of the page like "line 1 column 29 - Warning: trimming empty <p>". And also trims empty html tags which I don't expect.