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?
Thanks...
n. -- Nick Hodulik : : hodulik.com
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
On Mar 4, 2007, at 4: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?
Next time you have a .module file open, set its language to PHP by pressing ctrl-shift-opt-P. TM will remember it next from now on.
Thanks...
n.
Nick Hodulik : : hodulik.com
Haris Skiadas Department of Mathematics and Computer Science Hanover College