[TxMt] problem: php syntax bundle

Gerd Knops gerti at bitart.com
Sat Oct 8 20:54:15 UTC 2005


On Sat, Oct 8, at 3:27 PM, Andreas Wahlin wrote:

>> That's what happens, only the changed items in a Bundle are saved  
>> to ~/Library, the other items will keep seeing any changes.  
>> However the syntax is one 'item' so a change to it blocks out  
>> updates to the syntax.
>>
>
> That is not so great actually, since you miss out on "official"  
> updates. It would be nice to have something like "view differences"  
> or something of the like.

Actually there is a solution for languages. You can define your  
additions in a new bundle, then include the original. As an example  
my Perl language definition loos like this (deleting most of my  
additions for brevity):

{    scopeName = 'source.perl.gerd';
     firstLineMatch = '^#!.*\bperl\b';
     fileTypes = ( 'pl', 'pm', 'pod' );
     foldingStartMarker = '(/\*|(\{|\[|\()\s*$)';
     foldingStopMarker = '(\*/|^\s*(\}|\]|\)))';
     patterns = (
         {    name = 'entity.name.class';
              match = '^\s*package\s+.*$\n?';
         },
         {    include = 'source.perl'; },
     );
}

Now all changes to the official updates are still picked up.

Gerd




More information about the textmate mailing list