Skip to content

Instantly share code, notes, and snippets.

@alexrios
Created February 23, 2013 16:19
Show Gist options
  • Save alexrios/5020301 to your computer and use it in GitHub Desktop.
Save alexrios/5020301 to your computer and use it in GitHub Desktop.
Opening sublime text 2 from OSX terminal

Create symlink called sublime

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

Open your bash profile

open ~/.bash_profile

Alter PATH

export PATH=/usr/local/bin:$PATH

Restart bash

source ~/.bash_profile .bash_profile

Profit

sublime filename (replace "filename" by an actual file name)

sublime foldername (replace "foldername" by an actual folder name)

sublime . (to open the entire current directory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment