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

Hans-Jörg Bibiko bibiko at eva.mpg.de
Wed Nov 28 09:49:01 UTC 2007

On 27.11.2007, at 18:52, Thomas Aylott - subtleGradient wrote:

> On Nov 27, 2007, at 8:45 AM, Hans-Jörg Bibiko wrote:
>> BUG:
> (| = cursor)
> <ul>
> 	<li><a|>Text</a></li>
> </ul>

Is fixed. But the behaviour depends on whether you are inside of a  
start tag or inside of a end tag, because the parser looks leftwards.



"	<li><a|>Text</a></li>"





Is this OK?

> <ul>
> 	<li><a>Te|xt</a></li>
> </ul>
> First, properly selects:
> "<a>Text</a>"
> Then activating the macro again causes the selection to stay the  
> same, but the selection hilite disappears. No matter how many times  
> you activate it at this point nothing changes.
> Very odd.

This is really strange but I found the problem. My first command  
inside of that macro is to destroy a possible selection. I use this  

[[ -n "$TM_SELECTED_TEXT" ]] && open "txmt://open/?line= 

OK that works but not always ?? If there is at least one \t in front  
of the selection this command set the caret to an other position! Is  
this command wrong? I also used TM_INPUT_START_LINE_INDEX but no  
success. Anyway it turns out that the macro also works if I leave the  
selection as it is ;)

On 28 Nov 2007, at 01:39, Chris Adams wrote:
> On Nov 27, 2007, at 5:50 AM, Andy Armstrong wrote:
>> I'm pretty sure HTML::Parser is non-core - and because it's an XS  
>> module you'll need a C compiler installed too.
> It appears to be included in the default install on 10.5 and 10.4.

Yes, to install that module one has to install the Developer Tool in  
Well, I would be glad if Mac Tiger/Leopard has that module as default  
but I looked for an official site with infos about Perl's core  
modules on Mac but I didn't find one.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Select Balanced (HT|X)ML Tags.tmMacro
Type: application/octet-stream
Size: 5748 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20071128/bb52b7bc/attachment.tmMacro>

More information about the textmate mailing list