singingwolfboy wrote:Would also love to be able to set my EDITOR environment variable to point to Sublime Text 2, so that it would integrate into command line tool usage: for example, run "svn commit" and have Sublime Text 2 pop open for me to type in a commit message.
This can be done easily. I have my sublime text binary installed in my PATH, and I have the following setup in my .bash_profile to setup the EDITOR variable properly:
- Code: Select all
export EDITOR="$(which sublime) --new-window --wait"
Using $(which sublime) will get the full path to the executable. The options --new-window and --wait are useful when using sublime as your default EDITOR: --wait tells sublime text to wait until the window is closed to return to the terminal. --new-window is just handy because it will open the file for edit in -- you guessed it-- a new window! Not neccessary, but i have lots of files open in sublime all the time and it just helps me keep track of what's what.
To see all sublime command line options on *nix, use --help.
Hope this is useful.