Haven’t heard of Sublime Text 2? Well, I guess you’ve been living under a rock. Oh… you have? Well, in that case – why aren’t you using it yet?
Somewhere between a text editor and a IDE, Sublime Text 2 has been somewhat of an eye-opener into what text editors can really be.
Really, it can make a little nerd’s heart race just seeing this program in action. More than being pretty, it’s been a huge increase in productivity for me, and every day I find something new that I can either download as a plugin, or it’ll be released by the developers at a rather intense pace.
Not convinced? Well, this is why I use it. Hopefully I can make you use it too. First of all, it’s extremely fast. It’s extremely flexible. It’s also sort of free… well, more like an unlimited trial with a ‘buy me now’ nag every 10 or so saves. It’s also cross-platform!
I recommend buying it for the paltry $59 though, and this is why:
Loading the program itself is practically immediate, depending on your system. It’ll open up your last project in little more than a heartbeat. Clicking open files shows the source code immediately (even for large amounts of text), and allows you to quickly glance over large amounts of code.
Not only is it fast in the most literal of sense… getting places is really quick too. Seriously, check these keyboard shortcuts out:
CTRL + P: Quickly select files from your open project using a very quick fuzzy match searching algorithm. You can type the filename or start writing the file path… it’ll find it and immediately preview the selected file as you scroll through your search.
CTRL + Shift + P: Run different commands from your installed addons, change themes, insert snippets… this is your go to command for this sort of thing.
CTRL + Shift + F: Quick find, search all open documents and list the files and an excerpt almost instantly. Double click the excerpt or the filename and you’ve found your chosen piece of code.
CTRL + G: Goto line number.
More to the point, you’ll want to install the Sublime Package Control plugin. With this, you can search and install plugins from a rather large list, often coming straight from the github/bitbucket repositories. The addon system alone is a reason you’ll want Sublime Text 2. From installing new themes, to adding missing or useful features, to just making the development process that little bit nicer: you want this.
As a django/python developer, I recommend a few apps:
Djaneiro: Your one stop for django syntax and code highlighting for django templates. If you’re a django developer, get this.
SublimeRope: Code completion – and a nifty ‘go to definition’ feature… though not without some initial setup. I’ll briefly tell you how to set rope up to actually work… because it doesn’t unless you do the following:
Press CTRL + Shift + P and type “rope”, and find “New Project”. At the bottom it will ask you for project details. Press enter for the first one, and you may have success with the next if you use a virtualenv (I always get errors). If you do too, continue on:
Go to your new .ropeproject folder in your project and edit the config.py. Find the section that looks like this:
# You can extend python path for looking up modules #prefs.add('python_path', '~/python/')
Here you can add the sources to your site-packages and your current open project, e.g.:
prefs.add('python_path', '/path/to/site-packages') prefs.add('python_path', '/path/to/your/project')
SideBarEnhancements: Extra stuff for your side bar on right click. Don’t have a sidebar? Go to view->Side bar. Easy.
BufferScroll: Remember and restore all open files, bookmarks, folds, etc. when you open the editor.
At least go out and try it, you can find the editor at http://www.sublimetext.com/2