So, you’d like a terminal shortcut to open a file in Sublime Text? Easy!

Open a terminal and run the following commands to set it up:

sudo touch /usr/local/bin/subl
sudo chown 0:0 /usr/local/bin/subl
sudo chmod +x /usr/local/bin/subl
echo '/Applications/Sublime\ "[email protected]"' | sudo tee /usr/local/bin/subl

Cool! We’re done!

Now, to open a file in Sublime Text from the Terminal, just run:

subl /path/to/file

And it should open a Sublime Text window with the file opened. Enjoy!

PS I run this blog in my free time, if I helped you out, consider donating a coffee! (: