Last active
December 18, 2015 15:59
-
-
Save aikalima/5808229 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**How to open Sublime from the command line** | |
1. Verify that `Sublime Text 2` is installed in your `Applications` folder | |
2. Launch Sublime from the GUI and open the file `.bash_profile` OR `.zshrc` in your HOME directory. | |
3. Copy/Paste this line to .bash_profile: | |
``` | |
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/MacOS/Sublime\ Text\ 2 $1' | |
``` | |
4. Close and re-open your Terminal or ITerm | |
5. Now type `subl` and Sublime should start up. You can also pass a file name or and entire folder to subl like this: | |
``` | |
$> subl my_cool_program.rb | |
$> subl . | |
``` | |
The last command opens the current folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment