It may not perform perfectly, but wow does the command gg=G go a long ways towards making you html purty when you're using VIm as your text editor. I'm pretty anal about whitespace in my code, as my hack for inserting it into SQL when using SQuirreL SQL might show.

It's obviously not perfect, as this might show, but it ain't bad:

145:  <tr style="height: 12.75pt;...
146: 11</td>
147: <td>3/1/1719-20 Tuesday</td>
148: <td>X</td>
149: <td x:num="" align="right">2</td>
150: <td><a href="./full/011p2.png">2</a></td>
151: <td>"The King of P/russia/ has writ the following Letter to his
152: /Britannick/ Majesty in their [apparently the Protestants']
153: behalf" (from Warsaw October 2)</td>
154: <td>Advert for "SUPER Fine /Bohee Tea/ at 22 /Shllings per pound/
155: to be Sold by /Andrew Bradford/ in the Second Street
156: /Philadelphia/" (first non-runaway advert to catch my eye, but
157: likely not the first)</td>
158: <td colspan="6" style=""></td></tr>