Re(2): [TxMt] setting more-than-one name to a language pattern

Allan Odgaard throw-away-1 at macromates.com
Wed Mar 8 05:01:48 UTC 2006


On 8/3/2006, at 5:48, Quinn Comendant wrote:

> That works. I'm not sure if I did exactly as you suggested, but  
> here is
> what I came up with: [...]

It looks correct :)

> 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?

Yes (copied) -- so after a change, you no longer will see updates to  
that file.

> 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.

If you are semi-skilled with svn, it shouldn’t be that big a problem.  
svn will generally handle the merging. Only when major changes  
happen, would merge conflicts arise, which you would then have to  
resolve by hand.

> What is the "best practice" here?

Normally for language grammars, the best practice is to create a new  
grammar which include the old one. I should write up a section about  
this in the manual.

However, PHP is problematic because it is included by HTML -- so  
creating a new PHP grammar would not have that be the one used by  
HTML files, which makes the above “best practice” useless.

So currently there is none for included grammars (like PHP). I do  
hope to soon come up with a neat solution for this problem though…





More information about the textmate mailing list