I just installed sublime text 2 on Ubuntu 12.10 and would like to be able to run it as its own environment variable. Example
$ sublime somefile.js how do I add custom variables?
I am not sure this is the most elegant solution but you can create a script in your ~/bin/sublime with the following commands:
and then if your ~/bin/ folder is in your $PATH then you will be able to run
To check your $PATH just run
If you bin is not ther edit your .bashrc file and edit or add a line like the following:
This is the BEST way, I think!
go to your terminal and type:
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
(if your sublime text folder is in /opt/Sublime Text 2)
this command creates a symbolic link in /usr/bin and then you can call sublime command easily in terminal:
sublime .... (some code). That's all! :)
I think you are confusing the term environment variable, it seems like you want to place the a command to start Sublime Text in your path.
From the Sublime Text installation page:
Note that you must use the full path or this will not work. Suggested place to extract the downloaded file to is