Take the 2-minute tour ×

I'm quite experienced with how file association works for opening files on Mac OS X.
I recall reading somewhere that OS X keeps not only the information about which apps can open a file, but also which apps can edit a specific file type.
I'm having problems with those applications (Coda, Espresso, Forklift, Flow) that have an “edit with external editor” feature, since issuing this command on HTML files opens them with Dashcode. Dashcode of course is not the current association for opening these files (Safari is), so it's clearly looking for apps that can edit HTML.

Since I'd like to use TextMate as my editor in these cases, how can I set this preference?

share|improve this question
This is a great question! –  Matthew Schinckel Aug 4 '09 at 13:29
See also: superuser.com/questions/20822/… (slightly different - but also likely to be relevant). –  Jonathan Leffler Sep 16 '09 at 4:58

5 Answers 5

up vote 2 down vote accepted

There is this utility magic-launch that lets you set up rules for what you'd like done with certain files.

share|improve this answer
neat! thanks a lot –  Agos May 18 '10 at 11:16
it's shareware :-( –  Tom Corelis Aug 10 '11 at 0:30

This is managed by a system service called LaunchServices. There is no direct UI to make bulk changes, but you can adjust a single file type at a time as follows:

  1. Select any file of the type whose association you want to adjust (let's say the file is called "foo.myType", and you want all "myType" files to open in Photoshop.)
  2. Choose File->Get Info or hit Cmd-I.
  3. Click the disclosure triangle on the subpanel "Open with:".
  4. Pull down the dropdown box and select the app you want to use. If you don't see the app you want to use, select "Other".

  5. Hit "Change all" to change the association for all files of that type.

Hope that helps.

share|improve this answer
Alt-Secondary Click on a file gives you "Always Open With..." ... it does the same as Cmd-i, Change all. But without n dialogs. –  Slomojo Jul 3 '12 at 2:34

Each of those appropriate applications (Coda, Espresso, Forklift, Flow) will have a preference to say which external editor to use. For example in Flow it's available in the Editing section of the preferences window.

For changing the system default your best bet is to try updating the Launch Services database using peterb's answer.

share|improve this answer

On my installation of Coda, TextWrangler appears as my preferred editor of choice when selecting an external editor. (I assume that if I threw TextMate on the system, it would also show up).

If you're having issues with file associations, I reccomend installing RCDefaultApp. It installs to System Preferences, and provides an easier way to set file associations than via the file type (which may or may not hold in some cases).

You should be able to add TextMate to the file types you want to edit, and then it should show up when you right click on a file.

Hope this helps!

share|improve this answer
I already tried RCDefaultApp, but it only sets preferences for opening, not editing files: in facts it tells me that Dashcode is not set to open any file. Textmate does appear in the contextual menu for opening, the problem is that I can't set the preference for the default editor. –  Agos Aug 3 '09 at 20:21
What is the file extension that you're trying to work with? –  EvilChookie Aug 3 '09 at 20:33

TextMate allows for editing files within other apps using the "Edit in TextMate…" plugin. It isn't quite what you want (and would only allow you to edit in TM, not other editors, for instance), but may solve the problem for now.

You can install this, and then the menu will appear in all apps. Search the help menu for "Edit in TextMate"

share|improve this answer

Your Answer


