Skip to content

Instantly share code, notes, and snippets.

@jonschlinkert
Last active February 3, 2018 05:59
Show Gist options
  • Save jonschlinkert/735c4169a2c838bc6de54fcbb72563b5 to your computer and use it in GitHub Desktop.
Save jonschlinkert/735c4169a2c838bc6de54fcbb72563b5 to your computer and use it in GitHub Desktop.

Instructions for how to easily open sublime text from the command line, or open files or folders in sublime text from the command line.

Open sublime text from the command line:

$ st

Open a specific file in sublime text from the command line:

$ st foo.txt

Open the current working directory in sublime text from the command line:

$ st .

Alias

Add the following alias to your ~/.zshrc or ~/.bash_profile or ~/.profile or whatever config you use:

alias st="open -a /Applications/Sublime\ Text.app"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment