Sublime Text 2: It’s Awesome

January 7, 2013

 - Tags:

I have been using Notepad++ for years, but I was recently intrigued by all the Hype about another text editor Sublime Text 2. So I decided to give a go last week…and…WOW…it is absolutely AMAZING ! In this article I will give you 8 reasons to fall in love with Sublime Text 2.

  Update: As of september 2014, Sublime Text 3 is planned for release but still in beta. I look forward to the new version, but it may be a bit slow because there is just one person working full-time on it. For more info, go to the official website

Disclaimer: the following shortcuts are for Windows. For mac shortcuts, please refer to this website

#1 – It’s gorgeous

According to Sublime Text homepage:

“Sublime Text is a sophisticated text editor for code, html and prose. You’ll love the slick user interface and extraordinary features.”

Well, they didn’t lie to us. It’s just this beautiful. The UI is simple, clutter-free but still has a lot of features. The basic default syntax is really nice. Sublime Text also provides some very nice visual effects like smooth-scrolling when navigating inside a document, giving users a really pleasant experience. It might seems a bit frivolous at the first glance, but when you consider how long a coder uses a text-editor a day, aesthetics actually really matters.
sublime_text_2

#2 – It’s fast. Really fast

On Windows 8.1, Sublime Text starts really fast, usually within couple of seconds. For my WordPress projects, I often work on 10+ files opened at the same time, and Sublime Text can handle it without a hitch. Even with a lot of files opened at the same time, you can navigate through files, switch between tabs, and even switch between projects extremely fast. Searches in multiple files are also quite fast. Finally, even with 10+ plugins running in the background, I haven’t suffered any lagging times.

#3 – Multi-Line Selection

The most famous feature in Sublime text is the multi-line function: After you select a word, press CTRL + D, to select the next occurrence of this word. You can also select all occurrences of the selected word with ALT + F3. Then, you can edit all these occurrences at the same time. This feature is particularly useful when you want to update the name of a variable, for example. While some may argue that this is already implemented by the “Search & Replace” feature in other text-editors, still, this Multi-Line select feature is quite unique to Sublime Text and is also a bit easier and faster to use than the traditional “Search & Replace”.

#4 – The Command Palette / Open Files Dialog

After you activate the Open Files Dialog with CTRL + P, you just need to start typing the beginning of your file and you will see a list of files approaching this name. Just select one the name to get a preview. It enters and it’s open. Instantly. You can also open a file directly at a specific line by appending “:#LineNumber” at the end of the file name. This is really neat. For example, to open the file foo.php at line 30, you would type foo.php:40. You can also append @function_name at the end of the file name to open the file directly at the specified function. For example, below is a Open File dialog for a file called function.php. You can see a list of the functions contained in this file, below the file name. You can click on any item of this list to directly open the file where you want:
open_file_dialog

#5 – Project Management

With Sublime Text you can save all you open files in a project (a concept known as session in other softwares). If you want to work another project, all you have to do is hit CTRL + ALT + P , select your project, and it will switch to this project by loading all tabs (i.e open files) previously saved in this project. I found this feature really efficient, as in my daily work I often have to juggle between different projects, with priorities constantly evolving. This tool combined really well with the “Session Buddy” extension of Chrome, which switch between sessions of open tabs.

#6 – Many very good plugins

Advanced New Files: Create new files very quickly by hitting CTRL + ALT + N and typing the path and file name.
Tuts Plus Fetch Plugin: Fetch a pre-defined resource, unzip it if necessary and install it in a specified folder. I used this plugin quite often to do quite installation of WordPress, jQuery or Bootstrap.
Sublime Code Intel Provides auto-complete features.
Live ReloadRefresh the page automatically in the browser after each change. This is a huge time saver. No need to hit CTRL + F5 over and over.

#7 – Package Control

In Sublime Text, you can use a plugin called Package Control in order to manage other plugins more easily. After you install it, you just need to open the Command Palette with CTRL + SHIFT + P, type Discover Packages and you will see the list of all the packages registered in the official repository. Below is a screenshot of all the commands offered by the Package Control plugin:
package_control

#8 – It’s highly customizable

In terms of features, it’s really easy to enrich Sublime Text with Plugins (see Plugins).
In terms of appearance, everything is also very easy to customize thanks to the theme feature: Sublime comes prepackaged with 22 themes. To switch to another theme, go to Preference => Color Scheme => Color Scheme Default and select the theme you want. More themes are available online. As a matter of interest, the “Solarized (Dark)” theme is meant to be used in the day time, while the”Solarized (Light)” theme is meant to be used during night time. Below are some screenshots with different themes:
solarized_darkspace_cadetFinally, key bindings for commands are defined in a json file, accessible to users. Go to Preference => Key Bindings. You will see a ‘Default’ and ‘User’ file. The one you want to modify is the ‘user’ file. In sublime, you will find other instances of these json file, like for project configs. Below is an example of a custom configuration for key bindings:
key_bindings

Conclusion

I have listed couple of nice features about Sublime Text 2, but I have also left out many, like search in auto-indent feature, self closing brackets or find in files features. Before finishing the article, I would like to mention that Sublime Text 2 is not free, but it is still possible to use it in trial mode (all features included) without any time limit. You would just be bothered by a dialog text popping up from time to time, asking you to buy the license. If you feel like this software is valuable to you, that would be fair to compensate the authors for that. That being said, Feel free to download Sublime Text 2 and try it out for yourself :)

If you liked the article, you can subscribe to my blog to receive updates when new articles are posted.

If you would like to know more about Sublime Text 2, please check out the below resources.

Additional Ressources

  • The Official website of Sublime Text 2: Link
  • The unofficial documentation of Sublime Text 2, better than the official one: Link
  • The package manager, required to install other packages easily: Link

Leave a Reply