[TxMt] TM Find Dialog Enhancement (?)

Hans-Joerg Bibiko bibiko at eva.mpg.de
Tue Apr 24 09:08:19 UTC 2007


Dear all,

I don't know whether this is a common feature request. But  
nevertheless, ... ;)
(I also found nothing about it in this mailing list.)

Would it be possible to add the following feature to the normal Find  
dialog?

Given a string "c( 1, 22, 333 , 4444 )" in a line.
I want to highlight item by item ('1', '22', etc.) by using the  
normal Find function (APPLE+G).

To do so I would write for instance this regexp:
[,\(] {0,}(.*?) {0,}[,\)]

The problem is that the current Find function doesn't select only the  
content of the regexp group '(.*?)', it also highlight the commas and  
brackets.

My suggestion would be to change the Find function in such a way,  
that if there is at least one group specified by '()' within the  
regexp it only highlight the content of it. It also could select all  
occurrences of it at ones, if desired.
This could be chosen with two options within the Find dialog, e.g.  
'Match only group' and 'Match all groups'.

I don't know whether it would cost much effort to do this, but I'd  
find it quite useful to have such a option.

Of course, one coud write a separate command using 'Insert Snippet'  
but 'Insert Snippet' has some limitations.

Or is there an other way to do it with TM?

Thanks,

Hans




More information about the textmate mailing list