Open a file in Sublime Text 2 from command line

The idea is to create a symbolic link to the Sublime Text’s executable and put in the system’s path (execute “echo $PATH” to see your’s). I used /usr/local/bin:

GNU/Linux:

sudo ln -s /opt/sublime_text_2/sublime_text /usr/local/bin/sublime

Mac OS X:

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

sublime_text_2

Ref: https://www.sublimetext.com/docs/2/osx_command_line.html

You might also like

Add Twig syntax highlight in Sublime Text 2
Select the "Preferences->Browse Packages..." menu to open the folder that contains Sublime Text 2 packages. Download...

Easely add plugins to Sublime Text 2
Download Sublime Text 2 (at this moment the lastest build is 2181) and install it:Mac Windows 32...

Easely add plugins to Sublime Text 2
Download Sublime Text 2 (at this moment the lastest build is 2181) and install it:Mac Windows 32...

Use Sublime Text 2 to beautify HTML, CSS and JavaScript
First of all you have to install Package Control in Sublime Text 2 as I explained before. Then install...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.