[TxMt] Treating one file extension as another

Niels Kobschätzki n.kobschaetzki at googlemail.com
Sun Mar 4 22:32:27 UTC 2007


On Mar 4, 2007, at 10:55 PM, Nick Hodulik wrote:

> Is there an easy way to tell TextMate to treat one file extension  
> as another file type? For example, when doing Drupal development,  
> lots of Drupal modules end in .module, but they are really PHP  
> files. How does one go about telling TextMate how to do this?

you could change in the language-grammar of the php-module the line
firstLineMatch = '^#!.*php[0-9]{0,1}\b';
to
firstLineMatch = '^#!.*php[0-9]{0,1}\b' , 'module';

But I don't know how to do it from a personal bundle (when the  
language grammar of php would be updated your change would be gone  
afaik)

Niels



More information about the textmate mailing list