There has been a buzz recently, countless articles and videos, on why people consider switching to Sublime Text 2. You might have already heard about this awesome text editor but what’s so special about it? That’s a good question and there are many answers for it.
Released by Jon Skinner in January, 2008, Sublime Text has come a long way ever since. It is constantly evolving and doesn’t think of slowing down because frequent updates make sure users get added features and functionality needed to do their coding easily, fast and without any distractions.
There is really no need for an introduction because there are few interesting features to cover. So, grab a cup of coffee or tea and without a further due, let’s get started!
There is probably no such a thing for text editors to take up a considerable amount of space on the disk, but there sure are quite a few of them cluttered with unnecessary features. Sublime Text 2 is unique and as a result you get a lean editor that packs a big punch. So, instead of coming along with a set of built-in plugins you will probably never use (also called as extensions and packages), you can choose to install the neccessary ones via Package Control to add more functionality (later on that). This way you can expand it and use the tools you actually need. But now let’s talk about how much space does it really take up and what’s the difference between other text editors.
The installation file itself takes only about 5Mb of the disk space which is quite small when you look at the big picture. Of course there is a connection between the size and the amount of features added, but then again, Sublime Text 2 provides almost every critical feature you could think of while taking up inconsiderable amount of disk space. How is this possible? There are many factors affecting this, starting all the way from development process.
However, note that lightweight does not simply mean that it is “better” than other text editors, and this comparison is only made for informational purposes (few random text editors were chosen). But nevertheless, here are the results.
Sublime Text 2 is by far the fastest text editor I have ever used. But don’t take my word for it, you should try it yourself. Try opening a file that is huge (more than 100Mb, for example) and measure time, and then compare it with others. You’ll see the difference.
So far we know that this is a wonderful, lightweight, compact and simple editor. However, there are a few things missing so we will fill those gaps with some useful plugins and extensions. Not only do they make your workflow more efficient, but also provide features that even some IDE’s lack. The one plugin you should install before considering using others, is Package Control. Without this plugin, further installation of plugins would be a headache if not impossible.
Package Control is developed by a software engineer Will Bond to help you easily discover, install, upgrade and remove packages from various sources. This is very important because most if not all plugins will be installed with the help of Package Control. There is a tutorial featuring two simple ways to install this plugin found on his website. To install this package the easy way, follow these instructions:
- Access Sublime Text 2 console by pressing Ctrl+` (Also known as grave accent – you can find it below “Esc” key) and paste in the following code:
[css]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'[/css]
- Restart Sublime Text 2 upon successful installation
You’ve successfully installed Package Control and installing additional plugins will require no effort whatsoever. Simply go to Preferences > Package Control and start exploring features this plugin offers.
I will also write a post about some of the most popular and useful extensions. Together they will definitely prove that Sublime Text 2 is a wonderful editor with many capabilities. So stay tuned!
This is one of the neat features Sublime Text is well known for. Minimap comes in very handy when you have to deal with large files containing hundreds or thousands of lines of code. No need to use the mouse wheel to scroll down for a speciffic line of code because it takes ages and is innefficient compared to using minimap. Located on the right, it allows easy navigation. For those users who don’t like it, there is a solution – simply go to View and hit Hide Minimap.
It’s a real advantage when you see software that is designed to run on multiple platforms. Available for all three major operating systems – Windows, Mac OS X and Linux, this editor keeps getting better and better.
6. Color Schemes and themes
Before we go any further, there is one thing you need to know. Schemes and themes are two separate things – themes change the looks of UI elements and schemes change the main text-editing area. Using them is a great way to tune up this editor and the good news is, there are plenty of them.
Sublime Text 2 has a great amount of schemes included – 22 to be precise. Similar amount of schemes is also available on other editors but we will talk about how to add additional ones in case you want a wider selection. Although this is more like a personal preference, it definitely helps to customize this editor for your needs. These additional color schemes can be easily added from Package Control.
There are many available themes but there is one very widespread and well known called – Soda. It’s made by Ian Hill and provides awesome looks just like working on Mac in Coda or Espresso. This tutorial on GitHub will guide you through the installation process which is easier than you might think.
However, if you want the fastest method, follow these steps:
1. Go to Preferences > Package Control and then click on Package Control: Add Repository.
2. Paste in the code:
[css]git clone https://github.com/buymeasoda/soda-theme/ "Theme – Soda"[/css]
3. Go to Sublime Text 2 > Preferences > Settings – User
4. Update your theme entry to be either
"theme": "Soda Light.sublime-theme" or
"theme": "Soda Dark.sublime-theme"
Example user settings:
"theme": "Soda Light.sublime-theme"
TextMate themes are 100% compatible
This is quite awesome and thanks to the compatibility with TextMate, all of the themes available on TextMate Theme are supported by Sublime Text 2. Simply download .tmbundle files and then put them in Packages folder. They will be recognized automatically.
7. Distraction-Free Mode
Distraction-Free Mode is self-explanatory. It allows you to work without seeing anything but the main coding area, right scroll-bar and top menu. Useful at times when serious stuff must be done.
8. Layouts (split screen)
This is used more among advanced programmers and provides options to switch to common layouts including:
Single (by default)
But there’s more to it. You can also use them to have multiple views of the same file. This is efficiency to the max and will greatly favor those who work on big screens.
9. Goto Anything
Goto Anything allows you to quickly navigate between and within files. Fast.
Type part of a file name to open it. Files can be open files, recently closed files, or files in the project. The fuzzy matching is fast and intelligent, providing instant-as-you-type navigation on 50,000+ file projects.
10. Portable version (Only for Windows)
I wouldn’t say that it’s rare to see a portable version available for text editors but sometimes you just don’t want to install the whole package on your computer. There may be a hundred reasons for that but I do want to point out a huge advantage of portable version which is only available for Windows.
One of the most common reasons why few people prefer to use it over the installed version is because you can copy and paste all directories along with all the plugins and extensions on a different computer, and it will work perfectly. Portable version is called like that for a reason and if you’re a serious programmer who often likes to store software on a USB stick, then this is a perfect tool for the job.
11. Dev Builds
For those who are always in need for new updates and features, you can always choose to use dev builds. What does that mean?
These are the in-progress versions of Sublime Text 2, and they are updated more frequently. Feel free to use them, but keep in mind you will be running less tested code, and you’ll be seeing many more update notification prompts.
Sublime Text 2 has definitely earned its place among all the popular editors out there. Without a doubt, it is one of the best I have used in a while and many would agree. The real question is, how far can this editor go? With more improvements on the way, this editor gets better and better with every update.