28 January 2013

Sublime Text 2

As a software developer (of mostly the C++ variety), I’ve used a few different text editors through the years. Vi at QUT, Emacs at Motorola (the keyboard shortcuts are etched on my mind!), then with a move to Windows, Visual Studio and Notepad++. At ASTC I eventually started using Eclipse, and dabbled with Gedit on Linux. After buying a Mac for home, I started using TextMate. Now, after having used it for the last six months, I think I have finally found the one:

Sublime Text 2!

It’s awesome in an understated, utilitarian, not every one will get it kind of a way. I can’t see me switching editors again any time soon.

Cross platform. It works almost identically on OS X, Windows and Linux; there is no poor cousin here! Of course, there are the expected small differences in menu layout and keyboard shortcuts to suit the native environment. A single license allows you to use Sublime Text 2 (ST2) on all platforms.

Fast and polished. Everything is fast and responsive. All files, even your 20K line behemoth, open instantly and scroll as smooth as butter. You can throw something ridiculous at it, like say a 5 MB PDF file, and it won’t even flinch, you’ll have an instant page of gibberish. Change a configuration file, and instantly see the effect with nary a millisecond of delay, let alone the need to restart the application.

Split views. I have always loved this feature since my Emacs days, I find it extremely useful to be able to view two different parts of a file at the same time. It’s also handy to be working on a file in one view, while consulting the API header file in the other.

Simple JSON configuration files. JSON is a great choice for configuration files, and the simple layered file scheme works brilliantly, giving you precise control over configuration, at per-project, per-language, per-plugin and per-platform levels. I share my configuration files (actually, all my ST2 plugins too) between OS X, Windows and Linux via Dropbox.

Python plugins. I am a big fan of Python, so it is nice to have ST2’s plugin architecture based on it. There are plenty of ST2 plugins out there! I try not to go too crazy with plugins; I use about eight of them reasonably frequently.

Command palette. Reminiscent of extended commands in Emacs, ST2’s command palette accessed via Command-Shift-P provides access to the full set of commands. Instead of the typical tab-completion mechanism, ST has a “fuzzy matching” mechanism that works fantastically!

Command-P goto anything. This is a great feature, easily go to any file in the project, line number or symbol. It uses “fuzzy matching” like the command palette.

Want don’t I like? Not much. The only thing that annoys me: inconsistency in syntax highlighting across different languages and different colour schemes. Some of the standard colour schemes simply don’t work properly with all languages. I guess there might need to be a stricter standard for the set of scopes used in syntax definitions. Also, I’m not sure how useful the “Minimap” feature (a compressed visual representation of an entire file) is, it seems a bit gimmicky, and it occupies too much screen real estate; I leave it turned off.

I can highly recommend Sublime Text 2. It is worth every cent of its USD $59 purchase price.