Setting Up Sublime 2 as a Service

Or in other words - making it so that you can 'right click' a folder to open it in Sublime.

  • Run Automator
  • Add a new service
  • Add "Run Shell Script"
  • Setting Shell to /bin/zsh
  • Set the Pass Input value to As Arguments
  • Enter a command line of: 

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

  • Setting "Service receives selected" to "files or folders"
  • Click save  as whatever you want to the command to appear as - I suggest 'Open-in-Sublime"

 

Original instructions came from Jeffrey Way  and the fix to make it functional from this Stack Overflow discussion

Props to Stack Overflow User riccardo-marotti for the screen shot

Props to Stack Overflow User riccardo-marotti for the screen shot

Props to the Tuts Tutorial for this screen shot

Props to the Tuts Tutorial for this screen shot