How to give more than one scope name to a pattern? I don't want to include ALL the matches for keyword.control.php in my symbol list.
On Tue, 7 Mar 2006 10:47:14 +0100, Allan Odgaard wrote: You can name captures [1], so you want to capture the case part, and likely the label part, and assign an (additional) name to that.
[1] http://macromates.com/textmate/manual/language_grammars#rule_keys
That works. I'm not sure if I did exactly as you suggested, but here is what I came up with:
{ /* Q: Capture for symbol list: case 'xxx' : */ match = "\b((case)\s+('.*?')\s*(:))"; captures = { 1 = { name = 'meta.symbol-list.php'; }; 2 = { name = 'keyword.control.php'; }; 3 = { name = 'string.quoted.single.php'; }; 4 = { name = 'keyword.operator.string.php'; }; }; },
Oh, and a big question just occurred to me in my rampant editing of all my bundles: How will we ever manage merging upgraded bundles into our changes? I've followed the instructions on the website to "svn co" the bundles I want from macromates.com into /Library/Appl...TM/Bundles. But once I make one modification to, say, the language bundle for PHP, isn't the old copy moved to ~/Libarary/... and thus the svn updates ignored? Perhaps "svn co" into my ~/Libarary/... folder would have been smarter since then I could merge changes...but, uh, that's sounds like a lot of work.
What is the "best practice" here?
Q