Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dotherightthing/4bd73865fce685feefe800d178b9251b to your computer and use it in GitHub Desktop.
Save dotherightthing/4bd73865fce685feefe800d178b9251b to your computer and use it in GitHub Desktop.
[Open files in Sublime Text 3 from the command line] #shell #subl

Open files in Sublime Text 3 from the command line

1. Add a ~/bin directory to your path

$MAMP_PHP path is already in my path:

nano ~/.bash_profile
export PATH="$MAMP_PHP:$PATH"

Check the value of $MAMP_PHP:

echo $MAMP_PHP
# /Applications/MAMP/Library/bin

Create a symlink from Sublime's command line tool, subl, to my $MAMP_PHP bin directory.

This makes subl available as a bash command.

2. Make a symlink to subl

3. Verify that the symlink works

subl --help

subl ~/.bash_profile

Sources

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