Making The Best Text Editor Better: 7 Great Sublime Text Packages
Sublime Text has become the gold standard in serious text editing. Yes, if you need to work via SSH, you’re going to need to learn Vim – but if you do any sort of development work on your own machine, you need Sublime. Github’s Atom may soon take the crown, but as long as it’s in closed Beta and available for Mac only, Sublime is still king. One of its strongest features is its robust package system, and I’m here to tell you about 7 packages you need to try today.
If you’re unfamiliar with Sublime Text itself, this post may not do you much good. You might want to check out why coders love Sublime first. But if you’ve been using it for a while and want to up your game, we’re in business. All of these work on Sublime Text 3.
You Need Package Control
Package Control isn’t on my list of 7 packages you need to install: It is so awesome, we just take it for granted. On the (very slim) off-chance you don’t yet have Package Control installed, you need to go install it now, then come back to read about the packages you need to get.
Emmet takes you from this:
Essentially, you type in a bunch of CSS selectors, hit Tab, and get a full HTML skeleton. It used to be called Zen Coding and I first covered it in April 2010. Four years later, it’s just as awesome. If you’re comfortable with CSS, you can use Emmet to spit out a complex and beautifully indented bunch of HTML in seconds, with classes, IDs, and everything else.
I use Sublime Text for both code and prose. In fact, I am writing this very post in Sublime, using the excellent MarkdownEditing package. Here’s what it looks like in action:
Yes, it isn’t very colorful or flashy. But what makes it great is its excellent support for Markdown tokens. For example, if I type an asterisk at the beginning of a line, MarkdownEditing knows I’m making a bulleted list – so the next line will start with an asterisk, too.
I can also select some text and hit Ctrl+Shift+B and MarkdownEditing will make it bold; Ctrl+Shift+I makes it italic. Creating links is a snap, too. MarkdownEditing has many other features, but even these core ones make it worth your while. If you would like to learn more about Markdown, you should check out our free Markdown ebook .
Markdown hardly ever stays Markdown: When it grows up, it becomes HTML. That’s where Markdown Preview comes in with its host of useful commands:
Markdown Preview hooks into Sublime’s Build system, and essentially lets you compile your Markdown document into HTML with a single keypress: Hit Ctrl+B when editing a Markdown document, and Sublime instantly creates an HTML file of the same name in the same folder.
More useful (for me) is the fact that you can also render HTML into a Sublime window. This way you can select a bunch of Markdown and instantly get a new Sublime buffer with HTML in it, which you can selectively copy and paste elsewhere.
As an editor, I often work on other people’s HTML… and it very often contains stuff it shouldn’t. From “smart” quotes to needless image attributes some visual editors insist on adding, this sort of crud just has to be removed before publishing. But removing every single smart quote and extraneous artifact by hand is not only tedious, it also virtually guarantees you will make mistakes. That’s where the awesome RegReplace comes in:
With RegReplace, you configure all of these replacements just once. You edit a JSON structure with representing a bunch of regular expressions. You set a regex match pattern and a replacement, give it a name, and you’re done. You can then chain all of these patterns together and bind them into one single command. Issue this command, and presto, Sublime cleans up your document in less than a second.
You do need to know your regex to effectively use RegReplace – I recommend using something like Rubular to practice and build your match patterns.
Tag is one of the least-documented Sublime plugins I use. The only description you’ll find on the Package Control site says it’s a “collection of packages about HTML/XML tags.” Fortunately, its Github repo has a bit more information on what it does.
For me, its most important feature is tag closing: Let’s say I type a strong tag; then, when I want to close it, all I need to do is type </ (i.e, open a tag and type a slash). Sublime will then automatically figure out what’s the right tag to use for closing the currently open tag, and will do it. It’s awesome, because it blends right into your regular workflow – no shortcuts or commands to memorize.
I use Sublime Text for everything, and that includes keeping track of my todo list. I do this in a simple plain text file stored in Dropbox (we have an ebook about Dropbox, too ). ToDone is a simple syntax that lets me nest tasks, mark them as done, add notes, and set out priorities:
It is super-simple, and my only wish is that it had a compatible Android app. For me, it is far superior to the much-lauded Todo.txt , but to each his own.
Last one’s the simplest: Word count! This one is so basic, I’m not even going to bore you with a screenshot. Install it, and you get a running tally of your current word count in the status bar. Updates as you type, completely silent otherwise, and essential for many kinds of writing.
The Package Control website currently lists approximately half a zillion Sublime packages (I counted). These are my picks, based on months/years of actual use (depending on the packages – I haven’t been using all of them for years). That said, this is purely subjective, and I’m always curious to hear about awesome packages I didn’t know about. Share your favorite Sublime Text package tips in the comments!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.