This is an article about Sublime Text 2 and 3 and the reasons I use it.
Recently Sublime Text is becoming a buzz-word and seems like big amount of people are using it. I’ve already heard people complaining about it’s mass popularity but here’s what led me to the point using it and why I think that it’s a great tool to enhance productivity.
While writing HTML5 JavaScript applications the last good solution before I started to use Sublime was Aptana but it was very slow back then and sometimes the autocomplete was slowing me down instead of actually helping me remember things. And just when I decided that I’d be bether off with Notepad++ instead I saw a guy using Sublime Text 2 Beta. And that was it 🙂 the search ended.
Why so popular?
The popularity of Sublime Text comes for a reason – it’s really easy to start using it wihtout any additional effort involved (yes, VIM). You just need to start typing. And still you’ve got the Vintage Mode if you’re into VIM (but I havent saw anyone using it since if you’ve spent the time to master VIM maybe you wouldn’t need anything else to be in your way.
Beauty – Damn it’s beautiful. 🙂 And you can modify the skin and install many additional community generated skins.
Fastness – Sublime is supa-dupa fast. And that’s because it’s just a text editor in the end. Ofcourse you can add all kinds of packages to it (to make it slower 😉 ) but in the end it’s up to you. And the boot time.. oh the boot time :)))
Projects – Another nice conccept about Sublime is that it’s not mandatory to create a project to use it for editing a single file. And even if you need something like a project you could as well just use a simple folder that you open with it. It automatically becomes a project and you can use it’s Search/Replace/Autocompletion of pakcages using all the files in this folder. And still you can have real projects with files with configurations.
Packages – These are additional functionalities provided by the comunity that enhance the editor. There are many packages and there are 2 ways to install them – a easy one (just copy the files and enable it) and a super easy one – install the Package Control and use it to find and install packages right away. I plan to write a post about the Packages I use for JS apps and PHP development.
Open anything – with Ctrl + P (Cmd + P) any file of your project is some typing away. And the typing is very forgiving for missing characters 😉
Find any function – in the open anything if you add a @ you start searching among the function definitions in the selected file. You can do it for the current file with Ctrl + R (Cmd + P)
Find any setting – with Ctrl + Shift + P (Cmd + Shift + P) the most vital settings are just a search string away. Again very forgiving for missing characters.
Split window – You can split your editor screen on 1/2/3 or 4. And you can open the same file in all of the windows. If you want to keep track of different locations of it.
Bookmarks – Ctrl + F2 adds a bookmark to any place of the file and also rememvers the exact position of your cursor and it’s selection. With F2 you can run through all the bookmarks you made in the current file.
Shortcuts – the shorcuts in Sublime are one of the things I use the most. Some of them are very similar to the shorcuts you have in Chrome so the learning curve there is also not that big.
You can check my presentation from the workshop we had in init Lab here. There are some of the settings and shortcuts that I use.
Code minimap – in addition to the scroll you get a minimap for better orientationn in the code. It helps you find the desired piece of code even if you don’t use the bookmarks functionality.
Multiple cursors – you can have multiple cursors and type simultaneously on multiple locations. This is very useful for code refactoring and fixing typos or inputing large amount of dummy data in some test cases… also for simple showing off in front of people that are not using sublime or are not coders at all.
So if you haven’t tried using Sublime and you’re tired of your current medium for writing code give it a try. It might be a best fit.
Cheers!