When editing HTML in emacs, is there a way to automatically pretty-format a blob of markup, changing something like this:
<table>
<tr>
<td>blah</td></tr></table>
...into this:
<table>
<tr>
<td>
blah
</td>
</tr>
</table>
When editing HTML in emacs, is there a way to automatically pretty-format a blob of markup, changing something like this:
<table>
<tr>
<td>blah</td></tr></table>
...into this:
<table>
<tr>
<td>
blah
</td>
</tr>
</table>
http://www.delorie.com/gnu/docs/emacs/emacs_277.html
C-M-q
Reindent all the lines within one parenthetical grouping(indent-sexp).
*C-M-\*
Reindent all lines in the region (indent-region).
Tidy can do what you want, but only for whole buffer it seems (and the result is XHTML)
M-x tidy-buffer