On 22.09.2008, at 12:11, Alex Ross wrote:
I believe I found a way to do the reverse.
Install the attached command, edit a tmLanguage in TM, select a given optimized regexp and invoke that command. It will open a new doc with a sorted list of - hopefully - all matched keywords. I tested it for some of these regexps BUT PLEASE check it whether it works for everything ;)
Oh, well, it was a good exercise.
Yeap ;)
Here comes a slightly improved version. It compiles the regexp only once (not for each while loop and sub) thus it's a bit faster; and I fixed [a-zA-Z|]+? to [^(]+? (I forgot it in the first version)
Maybe one can put both scripts into the Bundle Development bundle?
--Hans