[TxMt] Regex Zero-width positive lookbehind
Allan Odgaard
allan at macromates.com
Thu Sep 8 17:54:42 UTC 2005
On 08/09/2005, at 18.46, thomas Aylott wrote:
> I would also like to use ZWPL in regular searched & macros.
> Once you have oniguruma for searching setup i'll be able to finish the
> shortcut for 'select-contents-of-next-attribute' that I've been
> working on.
Seeing how this is a macro, you could record:
1) search for "(?=.*?")
2) move right
3) search for [^"]*
One problem I see with this though, is, that you can't know if you're
inside an attribute, i.e. if you are, you'd have to skip the closing
" before performing the steps above.
(and now I await the request to use scope selectors in searches :) )
> Then I'll just have to figure out how to make a command for 'select-
> contents-of-previous-attribute' but I have no clue how to search
> backwards easily.
With normal searches you could search backwards for " (thrice). When
I do migrate to oniguruma, backwards regexp searches will be possible.
More information about the textmate
mailing list