Right click, open with Sublime Text 2

If you like to use Finder to browse your projects, you might like adding a right-click action to open a file or a folder directly in Sublime Text 2 (or whatever you prefer).

It is easily doable by creating a new service with Automator.

Open Automator and create a new service:

Select objects that receive the new service. Here we want to add the right click extension to files and folders:

selected files or folders

 

On the left pane, select “Open Finder Items” and drag it to the right pane.

Open Finder Items

 

Now in ‘Open with’ action, select Sublime Text 2 :

 

 

 

Save your new service:

Try it in Finder!

 

 
  • Renan Azevedo

    That’s such a great idea. You should have this on github.

  • You should create un shell script with :
    /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl – n $@

    then change “to stdin” to “to argument” .

    This works also when you already have Sublim text open on a project.

  • Outweb’s script need correction. It brakes with certain kind of folder names… Here is the right one:

    /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl -n “$@”

  • Interesting tip…tanx..

  • Ryan

    Your screen shot of “Open Finder Items” is correct but in the text you say to use “Launch Application”, which isn’t right. For anyone following this make sure you select Open Finder Items from the actions menu on the left.

  • CharlyBr

    Thanks! I’ve updated my article.

  • Marco Ribeiro

    Thank you, it helps me a lot, but I could verify that it doesn’t work when I try to open from Dropbox folder/file.

  • CharlyBr

    @Marco Ribeiro I’ve just given it a try and it works fine with Dropbox folder/file. I’m running Mac OS X 10.8.5

  • kent

    Thanks so much for the sweet tip!!
    Kent.

  • Pingback: MacOS: Neuen "Öffnen mit"-Service zum Dienste-Menü hinzufügen | nullseite.de()

  • Pingback: Add ‘Open Folder as Sublime Project’ to Windows Explorer context menu | a brain-dump-repository of ade jones()

  • Karyn Cassio

    Learned something new today. This is always a good thing. Thank you. I would rather open sublime from my terminal, but have been having issues with mounted drives recently, this is a good stop gap for that annoying issue.

  • Rob Laverty

    Bro!!! :O
    Life saver my friend =]