Hi all,
I've been working on a bundle for Stata and I've run into the following problem. Occationally in Stata one might want to load a file in another directory. For example
use ~/otherdata/bob.dta
I currently have the language definition set up so that use and bob.dta are colored differently.
Now, if the path has a space in it, Stata would like the statement with quotes arrount the path
use "~/other data/bob.dta"
Now TextMate treats the stuff in the quotes as a string and doesn't color bob.dta. What I'd like to have happen is that bob.dta is recognized inside the quotes.
Suggestions on how to achieve this would be much appreciated.
Thanks,
Tim
P.S. I should point out that in Stata mostly a quote really does designate a string, so I don't want TextMate to completely ignore quotes.
On Sep 6, 2006, at 7:33 AM, Timothy Beatty wrote:
Now TextMate treats the stuff in the quotes as a string and doesn't color bob.dta. What I'd like to have happen is that bob.dta is recognized inside the quotes.
TextMate doesn't match anything by itself, something in your grammar is matching the string. The rules are applied in order so the string rule must be higher up than the other. If you are just matching bob.dta that's would be the issue, it gets to the string starter before it even sees bob.dta
However in this case I'd do a begin on '^\s*use' with an end of '$ \n?'. That way your inside your own rule, can give it a scope (meta.include etc) and matching will be easy.