[TxMt] Where does TM store "Treat Files with Extension..."

Allan Odgaard allan at macromates.com
Fri Sep 16 09:11:57 UTC 2005

On 16/09/2005, at 10.35, Kevin Ballard wrote:

> My best guess is the OakProjectTextFiles key in TextMate's  
> preferences file. And no, I expect it's a simple string match,  
> meaning no regular expressions.

Indeed, yes!

OS X is heavily extensions based, and so, introducing files with  
arbitrary extensions and wanting them to be treated the same is not  
only a problem in TextMate, it's also a problem e.g. association a  
program with that file type in Finder. A better scheme would be:  

That said, if you have the developer tools you can manually set the  
file type to TEXT which will make TM open these, e.g.:

  find «dir with your files» -regex '.*\.[0-9]*$' -exec SetFile -t  
'TEXT' '{}' \;

The key bit here is:

  SetFile -t TEXT «filename»

> I'd really like to see TextMate do a check on unknown files to see  
> if they have any control characters in them (ASCII value < 32 or >=  
> 127). If there are none, it should treat it like a text file

Partially agree -- though maybe the heuristic should instead be, if  
the file is valid utf-8 (there are useful characters below 32, and  
above 160, for cp1252 above 128 even).

More information about the textmate mailing list