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

Ken Scott optikos at gmail.com
Sun Mar 19 04:17:43 UTC 2006


On Mar 7, 2006, at 10:01 PM, Allan Odgaard wrote:

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

[snip]

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

Could it be possible to have new mentions of the same scopeName in  
different bundles be additive, instead of the last one winning?

Then, in MyPHP.tmbundle I could have a language definition for  
source.php that injects my bundle into the existing PHP bundle. Not  
sure how to handle the inevitable collisions.

Ken




More information about the textmate mailing list