You are reading

A Designer’s Journey into Sublime Text 2

I’m a huge fan of TextMate.

For years, it has been my editor of choice, the first thing I open —if it’s not already opened— when I do client work.

However, I’ve been hearing good praise for Sublime Text 2. This relatively new, cross platform text editor has definitely caught my attention. And because the alpha version of TextMate 2 never grown on me, I decided to give it a try.


To make things fair and see if I will ever switch, I decided to use real templates from a real project. After all, if this was about to replace my main text editor, it should behave like that. This is what I’ve found after a week hacking with CSS3 and HTML5:

It’s beautiful. There’s something incredible beautiful in the lack of controls: it gives you the flexibility to make the interface what you want. Throw in your favorite color schemes and you will end up with an interface tailored to your tastes. Make sure to download Soda, a custom UI theme for extra gorgeous-ness. Menlo, the default font shipped with Sublime Text 2 is a refreshing twist on Monaco too.

It’s fast. And I mean, damn fast. How fast a black window could be? Just compare it with TextMate when opening files, and specially, when searching in files. Those extra microseconds you win really make the difference if you spend your day hacking at code.

It’s clever. Sublime Text 2 seems like a natural extension for your brain. Need to open a file? Hit CMD + P and start typing the file you need. No sidebars, no file dialogs, no nothing: just think and type. Writing CSS is damn inteligent too, the autocomplete module is super fast and predicts your previous/most used properties.

It’s functional. Sublime Text 2 has some cool window modes to help you focus, the one I’m using to write this text is called Distraction Free Mode, which blacks out whatever you have in your screen and presents just the text, slightly centered, in full screen mode. No dock, no menu bar, just a black canvas to work with.

It’s advanced if you want it to. In TextMate, I don’t only use Snippets —triggered by the convenient TAB— key, but Commands. These make certain operations with the text you have. For example, if I have a sentence that I want to mark it as a linked list item, I can just select the words and hit CMD + Shift + J to wrap them between LI and A tags. This makes coding a breeze. While TextMate Bundles are natively soported —just drop them out in the ~/Library/Application Support/Sublime Text 2/Packages/ folder—, Commands are a different story. I had a hard time figuring how to work this, but for now I just fixed this by adding some custom key bindings. Go to Key Bindings – User in the Sublime Text 2 menu and paste something similar to this:

[
  { "keys": ["super+shift+j"], "command": "insert_snippet", "args": {"contents": "<li><a href=\"\">${0:$SELECTION}</a></li>" } },
  { "keys": ["super+shift+p"], "command": "insert_snippet", "args": {"contents": "<p>${0:$SELECTION}</p>" } }
]

In short, this makes two new key bindings: the first one triggered by CMD + Shift + J (wraps selection in LI and A tags), and the second, triggered by CMD + Shift + P (wraps selection in P tags). Easy, no?

Extensible. Sublime Text 2 is extensible via Packages. Install the Sublime Package Control Manager for an easy way to browse and install new functionalities. I installed a simple, per-file ToDo Manager that I can always access via the Command Palette, by hitting Cmd + Shift + P, but literally there are tons of Packages out there.

So to sum up, the experiment was definitely an enjoyable experience. I had a learning curve of zero: switching from TextMate was very smooth and a matter of seconds. There are a lot of features that I didn’t review here, like the Minimap, the multiple select and so on, so do yourself a favor and try this gem out. It rocks.

Comments for this entry

Ya habia usado Sublime Text, pero nunca hice click..
Me enamoré de Notepad ++ y desde entonces sólo ese utilizo, pero voy a probar Sublime Text con esas recomendaciones que dió.

Saludos

Gonzalo

User

Sublime es un camino de ida! :)

Che, yo me gasto en escribir en Inglés y ustedes responden en Español? Así no eh :P

Seba

User

Download in progress…

Germelo

User

SublimeText2 está genial! Prontó compraré la licencia, primero quiero investigarlo un poco mas, conocer sus atajos rápidos y demás utilidades.

Sorry, otra respuesta en español para tu hermoso texto en inglés!!

Leave your comment

Please be polite. You can use these HTML tags: STRONG, A, BLOCKQUOTE, CODE



Copyright © 2004–2010 Rodrigo Galindez. All rights reserved. Hosting by XMundo Networks.

RSS Feed. Proudly powered by Wordpress. Correct at time of going to print.