[TxMt] Re: TmCodeBrowser 1.03

Scott McDowell play at slowchildren.com
Sun Nov 6 05:09:44 UTC 2005


Charilaos Skiadas <cskiadas at ...> writes:

> 
> 
> On Nov 5, 2005, at 5:32 PM, Scott McDowell wrote:
> 
> From a terminal, in your home directory, just type:  
> "mate .ctags.tmcodebrowser, and scroll down to the html section.
> Add the following line:
> --regex-html=/<([a-zA-Z]*)[ \t]+id[ \t]*=[ \t]*\"([^\"]+)/\1#\2/Ids/i
> Then this will (hopefully) catch all tags whose first attribute is  
> id, i.e if you have:

Thanks so much for this tip.  Your code seems to be working, but unfortunately
most of my tags don't always place ID as the first attribute.  It looks like
anchor tags and image tags are done the same way (ie: an img tag requires the
first attribute to be 'src' to show up).  This gets complicates thins if I have
an image with an ID.

For example:

<a href="url" id="mylink" />

The tag above shows up under images, but not IDs.

<a id="mylink" href="url" />

The tag above shows up under IDs, but not under anchor tags.

I'm not really so good with regex.  This command:

--regex-html=/<([a-zA-Z]*)[ \t].*+id[ \t]*=[ \t]*\"([^\"]+)/\1#\2/Ids/i

I'll see if I can't figure something out better, but it seems that whatever fix
I come up with should probably be applied to both anchor and image tags as well.

----Scott




More information about the textmate mailing list