When editing HTML in emacs, is there a way to automatically pretty-format a blob of markup, changing something like this:
-
2021-01-29 20:53
You can do sgml-pretty-print and then indent-for-tab on the same region/buffer, provided you are in html-mode or nxml-mode.
sgml-pretty-print adds new lines to proper places and indent-for-tab adds nice indentation. Together they lead to properly formatted html/xml.
|