Updated – 07/16/2012
Please see my updated post for current instructions on getting Sublime Text 2 up and running on your machine.
Updated – 01/12/2012
I recently switched over to Sublime Text 2 for my primary development editor. I was waiting to see what TextMate 2 would be like, needless to say I didn't see much an improvement. Sublime Text 2 has got some nifty features like multiple columns, rows, or even grid views. After a few hours of having 2 files open side by side I was hooked. Below are the things I had to do to get it customized enough for me to use every day. As I continue to customize and setup Sublime Text 2 I'll be updating this post.
Command line ToolTo be able to open a file or folder from the command line from anywhere create a symlink to the subl command line tool.
RVMEdit Sublime Text's ruby settings file:
It should look like this:
"cmd": ["ruby", "$file"],
Change it to this (replacing nickd with your username) in order to use the rvm-auto-ruby binary:
"cmd": ["/Users/nickd/.rvm/bin/rvm-auto-ruby", "$file"],
Spacing and tabsYou can set Sublime Text 2 to use spaces instead of tabs and adjust the indentation, however it seems to only change it for the current file your on, to make it global edit the User Base File settings file. Update – As Kevin Yank & Dimitar Dimitrov point out in the comments, it is best to put any custom user settings in the User packages. This way updates won't overwrite them.
// Set to true to insert spaces when tab is pressed
RSpec & Test::UnitI found this great plugin for running both RSpec and Test::Unit tests from within Sublime Text 2, https://github.com/maltize/sublime-text-2-ruby-tests. It allows you to run all the tests in an individual file and also supports focused tests, however focused tests don't seem to work for me. To get this installed:
Sublime Package ControlUpdate – I'd like to thank Dimitar Dimitrov & Pablo Barrios for pointing out Will Bond's Package Control. Sublime Package Control is a great addition to Sublime's ecosystem. There are ton of useful packages and themes that you can add just by selecting them. Just follow the simple installation instructions and you'll be good to go.
Press cmd + shift + p and type "Package Control" to find all the options for this add on. You can also get to it under the Preferences Menu.