6

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?

2

5 Answers 5

2

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

0
4

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.

1
  • Alt-Secondary Click on a file gives you "Always Open With..." ... it does the same as Cmd-i, Change all. But without n dialogs.
    – ocodo
    Jul 3, 2012 at 2:34
2

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.

1

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!

2
  • 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, 2009 at 20:21
  • What is the file extension that you're trying to work with? Aug 3, 2009 at 20:33
1

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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .