I was wondering if there was a way to set a keyboard shortcut to open a file with a specific program.

For example, for building emails I use Dreamweaver, and I would like to highlight a file and press, say, Cmd+Alt+D to open that file in Dreamweaver. Or press Cmd+Alt+C to open a file in Coda, which I use for websites.


You could use FastScripts to assign shortcuts to scripts like this:

    tell application "Finder"
        open (get selection) using path to application "TextMate"
    end tell
end try

There's a bug on 10.7 and 10.8 where the selection property refers to the second frontmost window in new windows though.

Automator services would also work in other applications:

But there's another bug where the shortcuts for services don't always work until the services menu has been shown once from the menu bar.

  • I was looking for a way to add an "Edit in MacVim" button to Finder's toolbar. Your answer + Automator really nailed it. – Nek Apr 7 '13 at 17:28

You should check out this site and see if it helps.


  • 1
    Link-only answers are discouraged, as they are sometimes difficult to figure out (linking to lengthy discussions) and can become unavailable when the linked site changes. Please summarize the gist of the solution directly in your answer, and provide the link as additional reference or source attribution. – Daniel Beck Oct 3 '12 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.