Come With Me If You Want To Live
The text editor is a programmer’s most valuable tool. Without it, you can’t write any code at all. It is your life-blood. You need it to survive. It will save you, just like Arnie did. There are plenty of text editors out there that solve one problem or another. There is also a couple of editors that are popular for certain platforms:
There are others (of course) like Emacs, Programmer’s Notepad, or even plain old Notepad.exe.
How Did I Get Here?
I have tried a few editors in the last few years.
- I learned vim which was a good experience, but I felt it didn’t fit in with the Windows ethos. Being able to edit completely without the help of a mouse was interesting, but I just couldn’t break completely free of it.
- Notepad++ is a solid editor which served me well for several years, but it just isn’t nice to look at. It is powerful, but does not have a bustling community making extensions for it. It can also be a bit sluggish to use.
The Saviour
Sublime Text is amazing! You only have to watch the demonstrations on their homepage to see why. Unlike all the above editors, it is not free, but after the 30 day trial I was sold.
TextMate Compatibility
One of the major drawcards for me (despite not having used TextMate) is that ST2 is 100% compatible with TextMate Bundles. This gives you access to a massive range of add-ons from the super popular Mac editor. Ones that I use are the Pascal and CacheManifest syntax bundles. I also have native packages to create Github Gists, print to HTML and search Stack Overflow to name a few.
Package Control
Packages can be installed using Sublime Package Control. It is a package itself which grants package management right inside Sublime Text. Once installed — you can install, upgrade and uninstall packages using the Command Palette (Ctrl + Shift + P on Windows).
Installing
To install Package Control we are going to run Python code from the console. Copy the following code and paste it into the Sublime Text console, accessed using Ctrl + ` and run it by pressing 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'
There are manual instructions if the console install does not work for you.
Once installed, check out the Usage page to get started. Try typing your favourite language into the Package Control: Install Package search query.
Stay tuned for more Sublime Text tips :)
Loading comments...