Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeonghopark/02c9e301411a3a7f9f61cbbdba5f4cdc to your computer and use it in GitHub Desktop.
Save jeonghopark/02c9e301411a3a7f9f61cbbdba5f4cdc to your computer and use it in GitHub Desktop.
“Open in Sublime Text” in macOS context-menu

Open in Sublime Text

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set “Pass input” to as arguments
  • Save as Open in Sublime Text

Add to Sublime Text

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set “Service receives selected” to files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -a $@
  • Set “Pass input” to as arguments
  • Save as Add to Sublime Text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment