[TxMt] Way to remember what language I'm using

Allan Odgaard throw-away-1 at macromates.com
Sun Mar 11 00:57:23 UTC 2007


On 10. Mar 2007, at 17:50, Michael Jackson wrote:

>> If you go to the bundle editor and locate the CSS language  
>> grammar, you can put ‘css.php’ in the file types array, that  
>> should make it treat files with this double extension as CSS.
>
> I tried to follow these instructions but no luck. I modified the  
> fileTypes array in the CSS language file to look like this:
>
> fileTypes = ( 'css', 'css.php' );
>
> but TM still won't recognize the css.php extension as CSS. Instead,  
> it reverts to PHP every time. Any ideas as to why this is happening?

You say *revery* -- what happens if you do: mate /tmp/test.css.php?

I did test it, and it works fine for me.

You can see which file type bindings TM has stored (as memory) by  
running this from Terminal:

     defaults read com.macromates.textmate OakLanguageFileBindings

I don’t think it will ever store a double-extension binding, but I  
honestly can’t remember, so to clear the memory, quit TM and run:

     defaults delete com.macromates.textmate OakLanguageFileBindings

Also, be sure to have closed the bundle editor, after you edited the  
CSS grammar (for changes to be committed).




More information about the textmate mailing list