Since I wrote my original post on switching to Sublime Text 2 a lot has changed. The final version was released just a few weeks ago. I also got a new computer and had to reinstall it; what I had originally written is a bit out of date so here is an updated post.
Command line Tool
To be able to open a file or folder from the command line from anywhere create a symlink to the subl command line tool.
Edit Sublime Text’s ruby settings file:
It should look like this:
Change it to this (replacing nickd with your username) in order to use the rvm-auto-ruby binary:
Sublime Text 2 stores all settings and preferences in editable files with key/value pairs. If you want to change any default settings edit the User Preferences settings file and place your changes there. This will prevent them from being overridden in an upgrade.
Edit the User Preferences file:
You can also edit this file from within Sublime Text. Click the menu item: Sublime Text 2 => Preferences => Settings – User. I changed mine to use spaces instead of tabs and adjust the indentation globally. I also turned off hot exit, word wrap, and a few other things. If you just look at the default settings file you can get an idea of what’s available to change. Just copy the keys to your own user file and change the values. I recommend checking this file into git as well.
To open all packages to see what’s in them:
Sublime 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.
The packages you have installed are listed in another settings file. Any changes you make to this file will be automatically picked up by the package manager. It is easy to just add or remove packages here as well.
Sublime Text 2 Ruby Tests Bundler Integration
When you try running tests from within Sublime Text it will probably error out if you are using Bundler. To fix this you need to override the command to execute the tests. Open you User Preferences file again and add:
Sublime Text 2 Ruby Tests ANSI Color Fix
When running RSpec test from within Sublime Text 2 you’ll notice that the output contains ANSI color codes.
To fix this you can edit this file:
and comment out the color_scheme line and add the one listed below. This doesn’t break any highlighting and will cause the ANSI color codes to be interpreted correctly.
This fix was posted on the Github Issues page
I hope this helps you out. If you have any suggestions or tips please post a comment!