I have been using Sublime Text 2 on my PC for a few months and now that I have a Mac, I got around to installing it today. I have been used to modifying scripts and code snippets from the command line by using “subl <filename>”. Unfortunately, that didn’t work after installing Sublime. I’ve read other blog and seen people use it so I figured that it was just an error after installation. Let’s fix it!
The first thing we need to do is create a .bash_profile file if we don’t have one already.
Then we can add this nifty alias to our .bash_profile:
alias subl="/Applications/Sublime\ Text\2.app/Contents/SharedSupport/bin/subl"
Finally, reload that bad boy
This was a head scratcher but a quick fix.