[TxMt] [ANN] Select Balanced HTML Tag!!!1!

Hans-Joerg Bibiko bibiko at eva.mpg.de
Thu Nov 22 13:50:35 UTC 2007


Hi,

Please try this TENTATIVE macro for selecting balanced HTML/PLIST or  
XML tags (according to TM_MODE).

Up to now I'm using a Perl script which will crashes (WITHOUT  
affecting TM or the current text!) on very large documents (more than  
12.000 lines). I try to fix this with Perl or I try to use Ruby instead.

Please check the macro against:
- any kind of embedded php/jsp/etc. stuff
- any kind of nested tags
- and kind of comments!
- any kind of unfinished XHTML code meaning invalid code etc.


The only thing I didn't check is that if a '<' appears within quotes  
like <input value=" < a >"...>. I can do this but then I'm not able  
to select e.g. the entire tag <input name="bla"> if my caret is  
within "bla". The clean way is to use entities.

In short terms try it out and give me any feedback.

Have fun (hopefully)

--Hans

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Select Balanced XHTML Tags.tmMacro
Type: application/octet-stream
Size: 4929 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20071122/8cfc6947/attachment.tmMacro>


More information about the textmate mailing list