[TxMt] Automatic Language selection of 'css.inc.php' files possible?

Steven Rowat Steven_Rowat at sunshine.net
Fri Mar 14 19:55:09 UTC 2008


Hi,
In brief, what I want is for TextMate to automatically use the 'CSS' 
Language scopes when I'm editing my <foo-css.inc.php> includes (which 
contain only css text), and to use the html Language scopes when I'm 
editing my html includes, <foo-inc.php> (which contain only html 
text).

What I've Tried:
I have read through the Language and Scopes sections of the manual, and then:
--in the Bundle Editor, made a new language called 'css-inc-php'
--copied the css langauge into it
--left the scopeName unchanged at 'source.css'
--changed the fileTypes to:
	fileTypes = ( 'css', 'css.inc.php' );

However, this does not do anything, so I assume TextMate is not using 
this information, at least in the way I've set it up.

Why This Is Important To Me:
I'm switching back and forth hundreds of times a day between the css 
include and the non-css include, and each time I do so, I have to hit 
control-shift-option-C or -H to get the CSS or HTML scope.

In other words, each time I switch from one include to the other 
(which I do about once every minute), I'm looking at the wrong scope 
language, because I just changed it for the previous file, and 
TextMate, obligingly enough (but sadly in this case) remembers.

Is there a way to get this to happen, so TextMate will automatically 
recognize the CSS Language for foo.css.inc.php files?

Thanks

Steven Rowat



More information about the textmate mailing list