By josh / July 22, 2012

Best plugins for Sublime Text 2

One of the best things about Sublime Text 2 is the hundreds of available plugins that loyal fans have written. Here’s a list of some that you should install today.

Package Control

If you haven’t set up the Package Control plugin, go do it. Right now.

Package Control allows you to browse and install hundreds of plugins, and setting it up is as easy as running a small script in the Sublime Python console.

To install a plugin using Package Control:

  • Press Command+Shift+P on Mac OS X or Ctrl+Shift+P on Windows or Linux to open Sublime’s Command Palette.
  • Type install to highlight the Package Control: Install Package command.
  • Press Enter to open the package list.
  • Type part of a package name to see a list of matching packages.
  • Highlight the package and press Enter. You’ll see a confirmation message in Sublime’s status bar when the installation is complete.

Enhance the sidebar

By default, the Sublime Text 2 sidebar is weak sauce. You can browse through open files and folders, but if you right-click on a file, you’ll get a menu with just a Close command.

The SideBarEnhancements plugin fixes this by beefing up the right-click menu, adding a number of commands that you’d expect like Copy, Paste and Delete, as well as Open in Browser, New File … and New Folder …. You can also define your own custom commands, maybe Open in Chrome or Open Command Prompt Here.

Quickly create new files

While it’s nice to have the ability to create new files with a right-click, menus are slow when you’re slinging code. The AdvancedNewFile plugin provides a simple prompt that allows you to generate new files by typing out your desired path and file name. Any nested directories that you include in the path will be generated if they don’t already exist.

Speed up HTML coding

I’ve covered Emmet in a previous post, and it’s still every bit as awesome. The basic concept behind Emmet is simple. When you’re writing HTML, XML or some similar language that consists of nested tags, Emmet allows you to define the tag hierarchy in a single line, using a CSS-like syntax. The plugin expands your one-liner to create the appropriate structure. For example, this:

 div > ul > li*3 


 <div> <ul> <li></li> <li></li> <li></li> </ul> </div> 

There’s a bit more to it, so install the plugin and check out the documentation on the Emmet project site.

Work with source control

I love working on the console as much as anyone, but I also prefer to avoid constantly switching apps when I’m cranking out code. Integrating version control into my text editor means fewer interruptions to my workflow.

The Git plugin brings some useful Git commands into Sublime, and SublimeHg does the same for Mercurial. The Gitignore plugin makes it easy to pull down boilerplate code>.gitignore files from GitHub, solving a problem that’s annoyed me for a while.

Help for bloggers

If you use Sublime for non-coding tasks like blogging, two handy plugins are MarkdownEditing and WordCount.

MarkdownEditing provides syntax highlighting and some handy text editing features, and WordCount tells you when you’ve gone on long enough, displaying the word count in the status bar.

Bonus Tip: View installed plugins

It’s easy to lose track of what you’ve installed, or forget the keyboard shortcut required to trigger some plugin that you only use occasionally. Fortunately, it’s easy to review your list of installed plugins and read their documentation using the Browse Packages command.

To view installed plugins, select Sublime Text 2 | Preferences | Browse Packages on OS X or Preferences | Browse Packages on Windows and Linux. The system file explorer launches, displaying the folders for all installed packages. Most packages include a README file that includes usage instructions and keyboard shortcuts.

P.S. Do you love using Sublime to get more done? Sign up for the free Sublime Text Tips newsletter to get more tips every week. As a bonus, I’ll send you a 12-page guide to Sublime’s advanced editing features so you can start using Sublime more effectively–today.

About the author


JJ - December 2, 2012

Just a heads up but I think that Zen Coding is now Emmet.

    joshearl - December 4, 2012

    That is correct–the new project site is

Click here to add a comment

Leave a comment: