What is Sublime Text 2 and why you should use it.

Have you ever heard about a beautifully powerful all-text editor Sublime Text 2? No? Well, then you were missing out a great tool. The author of this application states it the best:

[quote]Sublime Text is a sophisticated text editor for code, markup and prose. You’ll love the slick user interface, extraordinary features and amazing performance.[/quote]


Sublime Text 2 blank window

Yeah, that’s right – no bragging.

Me and Sublime Text 2

Before I discovered this great text editor, I used to code in either Notepad ++ or Adobe Dreamweaver (under Windows) and in gedit when using Ubuntu/Linux Mint. However, I wasn’t quite satisfied with those IDE’s (or editors) because they are not cross platform, are heavy and cost a lot (Dreamweaver). In addition to that, they lack many great features of Sublime Text 2.

So about 2 months ago I decided to look for some other text editor and came across Sublime Text. Firstly, I wasn’t very impressed by it because from the very first look it seemed like an editor without anything. After few weeks I gave it a second chance and searched the Internet for some articles about this software. And what I found was really amazing! I learned that it has plenty of plugins, many great features and much more. Now let me tell you about some of them.

Why you must use Sublime Text 2

First thing first, navigate to its website and download the bleeding edge version of it. The best thing is that it doesn’t matter if you are working on Ubuntu (and other Linux based  distros), Windows or OS X – it works anywhere.

1. It’s super light.

Yes, the installer for Windows version for example is not bigger than 6 MB. The editor loads pretty fast, drains just  a little bit of RAM (actually it is 50 MB with many plugins and 3 opened windows for me now) and it is also portable so you don’t even need to install it. Sublime Text is written in C++ and use Python for add-ons.

 2. Its key combos are very useful.

You can achieve many great things just by utilizing some of the key combinations. I will list here some of them:

  • Ctrl + Shift + P – It pops out the Sublime Text 2 alfa and omega command palette  from which you can activate the its snippets, edit the code, install, remove and update plugins (later to that) and many more.

Sublime Text 2 Command Palette

  • Ctrl + P – My personal favorite one. It brings up a drop-down menu with names of files currently present in the Folders structure (when you open a folder from Sublime Text 2) or names of files currently opened. The great thing about this is, however, that you can actually type in just the beginning part of the file name and Sublime Text immediately shows a preview of that file in the background. It doesn’t open, just shows a preview which is enormously handy in environments where you are working with many files.
  •  Ctrl + Alt + P – Sublime Text 2 comes with a nice feature to save currently opened session (folders with files) as the Project. After saving  projects, you can switch between them with aforementioned key combo. It is especially handy when working on multiple project such as a website (e.g. WordPress) and a forum (e.g. phpBB) to that  blog.
  • Alt + F3 – Do you know that this editor is able to make a multi-selection? You can find more about it on the official Sublime Text docs. Don’t have time for that? Just select a word you want to make a multi-selection of and do Alt + F3 – bam, all occurrences of that particular word in the opened file are selected. Now type something and every single selected word will change. Gorgeous.
  • Ctrl + Shift + F – Editing files has never been easier. I often find myself in a situation in which I need to find a bunch of code somewhere in my opened project. Then I just write the wanted lines and Sublime Text generates a report of all occurrences of that code in all the files of the project.
  • Ctrl + ~  Sublime Text 2 comes with a built-in Python interpreter that you open and use by this key combination. I like it because of its versatility. You can do basic math in there, … and other things just like in the real console.

3. Plugins

Plugins are an essential part of this powerful text editor. They vary from the ones which help you with coding to the ones that speed up the process of it. The best thing about them is that Will of wbond.net created a Package Control system which greatly reduces finding, maintaining and installing time of the plugins. The first thing you must do is to install the package control. Simply open the Python console (Ctrl + `) and copy this line and press Enter:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

After applying the patch, restart the application (always reopen Sublime Text after installing add-ons so it reloads the plugins) and now you can use Package Control withing the Command Palette (Ctrl + Shift + P). Open it and type in “install” (screenshot below). Now you see the full list of all available Sublime Text 2 plugins which were submitted to the Package Control (unfortunately, some of them have to be installed manually). Let’s list some of them that might be useful to you.

Install command


SublimeCodeIntel is code intelligence plugin ported from Open Komodo Editor. Its main advantage is doing autocomplete with the available languages and modules/symbols in real time. Code Intel currently supports PHP, Python, Python3, RHTML, JavaScript, Smarty, Mason, Node.js, XBL, Tcl, HTML, HTML5, TemplateToolkit, XUL, Django, Perl, Ruby.


This plugin highlights lines of code that are not valid and contains (potential) errors and/or syntax mistakes. It has built in linters for the main web languages such as CSS, Javascript, PHP, Python, Ruby, Perl, Java and some more. I really like SublimeLinter because it always helps me to catch and discover an error before something bad could happen. The only downside I have noticed is that when writing Python code, it highlights lines that don’t seem to be legit according to pep8 standards. Luckily, exceptions can be set under the Preferences -> Package Settings -> SublimeLinter -> Settings – Default.


ZenCoding is an add-on that allows you to make use of zen-coding application. You ask, what is it for? Zen Coding is a great plugin for high-speed HTML, CSS or any toher structured code format coding and editing. [quote]The core of this plugin is a powerful abbreviation engine which allows you to expand expressions—similar to CSS selectors—into HTML code. For example: [/quote]


..can be expanded into:

<ul id="navigation"> <li><a href=""></a></li> <li><a href=""></a></li> <li><a href=""></a></li> <li><a href=""></a></li> <li><a href=""></a></li> </ul> </div>

If you still do not fully understand how the magic works, don’t worry please. Watch this video:


Sometimes when you open an unknown file (without extension or just unknown), Sublime Text is unable to automatically show code highlighting because it doesn’t recognize the language. This plugin will make sure the code in the file is detected correctly and sets Sublime Text’s code highlighting to the right language.


SFTP plugin enables your Sublime Text to connect to your FTP, FTPS and SFTP server, upload, download and do all the basic operations with them. You can also map local folder to the remote one on your server and each time you save the file on your local machine, it gets automatically updated on the server. The only downside of it is that you have to buy it after the trial period is over (you can still use it but a warning will be displayed).


Coded by the same man who created the SFTP and Package Control plugins, this add-on runs your CSS through the Prefixr API. What does it mean? Well, for example, if you write this code:

.container {
   box-shadow: 20px;
   -moz-transition: -moz-box-shadow 2s;
   -webkit-border-radius: 4px;
   animation: slide 1s alternate;
   background: linear-gradient(top, #e3e3e3 10%, white);
   display: -moz-box;

..it transforms into this one:

.container {
	-webkit-box-shadow: 20px;
	box-shadow: 20px;

	-webkit-transition: -webkit-box-shadow 2s;
	-moz-transition: -moz-box-shadow 2s;
	-o-transition: box-shadow 2s;
	-ms-transition: box-shadow 2s;
	transition: box-shadow 2s;
	border-radius: 4px;

	-webkit-animation: slide 1s alternate;
	-moz-animation: slide 1s alternate;
	-ms-animation: slide 1s alternate;
	-o-animation: slide 1s alternate;
	animation: slide 1s alternate;

	background: -webkit-linear-gradient(top, #e3e3e3 10%, white);
	background: -moz-linear-gradient(top, #e3e3e3 10%, white);
	background: -o-linear-gradient(top, #e3e3e3 10%, white);
	background: -ms-linear-gradient(top, #e3e3e3 10%, white);
	background: linear-gradient(top, #e3e3e3 10%, white);
	display: -webkit-box;
	display: -moz-box;
	display: box;

Pretty good right?


Maybe not so popular plugin, I recommend it for any Django developer out there. It adds some useful snippets and after enabling the plugin, you can then select Djaneiro code highlighting option.

4. Eye candy UI

To be honest, I have never seen such a beautiful text editor. Though it is quite minimalistic, it includes everything what you need and that special scroll bar on the right hand side is really nice, isn’t it? You can, of course customize the scheme and also use themes from other editors such as Eclipse.

5. It’s almost free

Well, not exactly. It can be downloaded free of charge but only for a limited amount of time. After that you either buy the application or ignore the warning messages. I recommend the first option.

In the end..

Sublime Text 2 is truly the editor we all have been waiting for such a long time. I definitely suggest using it 🙂

Join the Conversation

1 Comment

  1. Pingback: Quora
Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: