[TxMt] Changing language for a specific file

Allan Odgaard throw-away-2 at macromates.com
Sun Feb 3 11:58:50 UTC 2008


On 8 Jan 2008, at 19:38, Nate Cavanaugh wrote:

> [...]
> Quick question, do you know if this is possible with TabMate *without*
> modelines? I'm working on a huge code base with multiple users and  
> strict
> coding standards and the modelines aren't allowed to sit in SVN,  
> which means
> I have to copy the mode lines every time I edit the file, in which  
> case, I
> might as well just manually change the language.
>
> Anyone know of a work around (even if it's a work around in SVN)?

TextMate will get the file type either from the first line of the file  
or the extension. The recommended solution is to use double-extensions  
when it is important that different file types have the same “final”  
extension, e.g. “foo.css.php”, “foo.js.php”, “foo.php” -- here all  
files are php, but TextMate can assign different grammars to them  
based on the secondary extension.




More information about the textmate mailing list