One dark evening in January around 30 geeks gathered at Podio for the monthly meetup in the Copenhagen Ruby Brigade. The only topic on the agenda was a grand showdown between code editors, but with such different editors as Emacs, Vim, Textmate 2, Chocolat, Sublime Text 2 and RubyMine in play, it was more than enough to cover an entire evening.

At the time I thought Chocolat might be the next big thing, but after only two rather frustrating days I went back to Textmate. I still had to present Chocolat at the meetup, but wasn’t able to say many nice things about it. I also showed off a few features in the Textmate 2 alpha such as multiple carets (uuh), but as Jesper Christiansen was quick to show us, Sublime Text 2 could easily match these. During the meetup I started to realize that Sublime Text seemed to be everything many of us had hoped for in Textmate 2, but in software that was available today in a polished, fully functional version, not a just a rather buggy alpha preview.
So I decided to dedicate last week to Sublime Text 2. I installed it Monday and purchased it Friday without looking back. And I’m still using it today. As a heavy user of Textmate for the past 6-7 years I felt right at home. ⌘+T brings up a file switcher that is slightly more clever and drastically faster than PeepOpen, and with that working I could start writing code straight away without feeling less productive than in Textmate. Speaking of the file switcher, I also really like that it instantly shows the file you highlight as a preview without actually opening it in a tab. This makes it easy to quickly browse around for the right file without opening a horde (a circus?) of tabs.
Other things that has already increased my productivity is the split view and auto completion. Textmate must be the last decent editor on the planet not to have split view, and now that I’ve started using it view and stylesheet, model and test and so on, I can’t believe I’ve lived without this feature for so long. I’ve printed out some useful shortcuts for Sublime Text and taped them to the side of my monitor, and it pays off to learn the shortcuts for managing and switching split views and tabs. Auto completion may not be that much better than Textmate’s for a language such as Ruby, but the fact alone that it displays suggestions all the time helps me remember that I can save some typing by pressing tab.
Of course Sublime Text 2 is not perfect out of the box, especially not when you are an old programmer that don’t want things to change too much too quickly. As friendly people where quick to point out to me on Twitter, the package manager is the first package you want to install, and the only one you want to install manually. It is also true that the default icon for Sublime Text does look a lot like the one for the Terminal, so I was quick to follow suit and replace it with a more distinctive one.
Essential packages includes SublimeLinter, ZenCoding and the Soda Theme, but coming from Textmate I also liked Textmate ERb style blocks, even though it’s not exactly perfect. Notice how I don’t link to those packages, since you just have to enter the name in the package manager to install them. All settings are managed through text files, and while that did seemed a bit primitive to me when I just encountered it, I quickly realized that it makes perfect sense for developers to manage their settings like this – as long as it is not XML files! Some helpful settings include trim_trailing_white_space_on_save, ensure_newline_at_eof_on_save, file_exclude_patterns and folder_exclude_patterns. A nice site effect of having settings in plain text files is that it’s easy to synchronize the settings between multiple computers using Dropbox. This guide explains how it’s done – it works beautifully.
If you haven’t tried out Sublime Text 2 yet I suggest you do so right now. If you’re a power user I’m sure you wouldn’t mind sharing a few tips in a comment.
Hello, I'm Casper Fabricius. I have developed for the web for 10 years, and have been enjoying Ruby on Rails for the past 5.
My experience covers communities, shopping solutions, multi-language sites, heavy back-end lifting and a wide selection of more traditional websites. I like to integrate Ruby with Java and .NET through JRuby and IronRuby when it makes sense. I am passionate about test- and behavior-driven development, but at the same time I am pragmatic and believe in getting things done.
I live in Copenhagen, Denmark, where I work for a fantastic company: Podio. I do not currently take on freelance assignments.
Leave a reply