[TxMt] Tabulation of end tags
Allan Odgaard
throw-away-1 at macromates.com
Sun Oct 30 07:31:28 UTC 2005
On 29/10/2005, at 17.43, Andreas Wahlin wrote:
> I really like the "indent selection" menu item in the latest build.
> Now I can finally select the entire document and just reformat
> everything with good tabs. One cool macro would be [...]
I think I already mentioned it in this thread, but this is the main
thing Tidy do (in addition to cleanup badly nesting and such) --
press ctrl-shift H with a HTML document, and you see the effect. It
can be used on a selection as well, but for that, use ctrl-shift-cmd
H (to skip the creation of standard HTML header stuff).
> I still wish for the RegExp support to really take advantage of
> this though :D (nag nag)
Well, there is a reason why I allow users to edit these things
themselves (and in this case, even document it in the help book)!
But I changed the increase/decrease patterns for HTML and XML, also
extended the foldings patterns slightly, and even made it recognize
an initial <!DOCTYPE broken over two lines (to have the second line
indented).
For HTML I made it increase indent on all but self-closed (XHTML)
tags and the few known tags w/o a closer. Though it should be
compatible with people who don't trust user agents to strip initial
spacing (which IIRC is only a “may” in the standard) and write their
paragraphs <p>like this</p> instead of indenting after <p>.
More information about the textmate
mailing list