[TxMt] (no subject)

Rob McBroom textmate at skurfer.com
Wed Jun 21 14:59:02 UTC 2006


As of rev 948:

   [NEW] Files without extension now open in TextMate (instead of  
TextEdit)
   when double-clicked in Finder.

True, this is probably what most of us want in theory, but  
implementing it this way has undesirable side-effects. For example,  
all of your shell scripts are identified as "Document" instead of  
"Unix Executable File" and their icon becomes the default blank page  
thing.

Anyway, the reason I'm writing is to share steps for getting things  
back to normal, in case others are bothered by this as well.

   1) Locate TextMate.app and "Show Package Contents" or "cd" into it or
   whatever
   2) Go into the Contents folder
   3) Open Info.plist in your favorite text editor. ;) [I've done  
this with
   TextMate itself and had no problems.]
   4) In the array of <dict> tags for document types, find the one  
that has
   "****" under CFBundleTypeOSTypes and comment it out (or delete  
it). In the
   latest version of TextMate (1112), this item is the last document  
type and
   can be found on lines 781-796.
   5) Save the file
   6) Run this command (all on one line): /System/Library/Frameworks/ 
ApplicationServices.framework/Frameworks/LaunchServices.framework/ 
Support/lsregister -kill -r -domain local -domain system -domain user
   (Looks like the kind of thing you would run using "sudo", but  
don't because
   it won't get your "user" domain.)
   7) Stop everything you're doing, make sure everything is saved,  
and hope you
   remember everything you were working on
   8) Log out
   9) Log in

Now, not that I don't *love* going through this process with every  
cutting-edge update, but could there be a preference (perhaps hidden)  
for disabling this behavior? Or could it just be removed? Personally,  
I use Path Finder, which allows you to right-click any file and open  
with the [GUI] editor of your choice. (It's always the first choice  
on the context menu, so it's not as bad as it sounds.) But even if  
you're using Finder, you can just drag unidentified files to  
TextMate's Dock icon, right? I didn't see a request like this in the  
Wiki. Am I correct in assuming I should add it there? Thanks.

Rob



More information about the textmate mailing list