Is there a way to get TextMate to auto pick the file language based on the file path?
As an example, I have both matlab scripts and objective-c files each with ".m" extensions. When the path is .../matlab/... I would like them to use the Matlab language bundle otherwise use the Objective-C language bundle.
When I used to use emacs, I had a load hook that was able to parse the file path and use the correct mode.
Incidentally, I've added "firstLineMatch = '^[#%]+\s*.*[Mm]atlab.*';" to the Matlab language which works if I start the file with a '% Matlab' comment - this works for files I write, but not ones others write. Maybe there is a way to have a "filePathMatch = '.*/matlab/.*'" (or equivalent) in the language?
Thanks,
-- d