Can Textmate nicely indent HTML?
Solution 1:
You can press ⌘+A to select all then Text->Indent Selection
.
Solution 2:
You can use Bundles > HTML > Tidy
or the shortcut ctrl+⇧+H.
Solution 3:
I'd like to point out something that crosses a bit the other answers:
If you select the text that you wish to format (or reindent), TextMate will apply specific actions only to that. So, if you CMD+A your document and then apply Tidy (either from the Bundles > HTML menu or with the CTRL+SHIFT+H shortcut) it will mostly only do indenting, skipping alerts on validations (that sometimes are unnecessary since we might be working on page snippets).