Archive Old post. Originally published 4 January 2013 on the WordPress version of this site. Preserved here for the search engines and the curious. Old me had opinions.
Developer 3 min read

Working with Sublime Text 2

I’ve been a long term user of Coda 2 from Panic for a few years now. Along the way I have strayed a few times to other editors mainly using TextMate if I am working on anything other than WordPress (which just seems to be awesome inside Coda 2 for me), but I always find myself back with Coda 2. I recently watched a great video series from Jeffrey Way over at tuts+ premium on Sublime Text 2 and found myself falling in love!

Sublime Text is a strange mix of terminal style editor and GUI. Most of the commands you run you tend to do via keyboard shortcuts or using what Sublime Text 2 calls the Command Palette. It allows you to install additional package (using Package Control, a brilliant package manager for Sublime Text 2), change the syntax and perform all kinds of awesome stuff. It’s fast as well. Really fast to open files and no lag when typing. Syntax highlighting is great and Package Control helps take Sublime Text 2 to a whole new level.

There are plenty of reviews of Sublime Text 2 out there so I don’t want to go over the same things I thought I would just share the packages I have installed.

  • Package Control - I have already mentioned it, but you need to have this installed! It really does make Sublime Text 2 so much easier to use. It is an easy to use package manager that allows you to easily install additional packages, syntaxes and snippets.
  • DetectSyntax - DetectSyntax is a plugin for Sublime Text 2 that allows you to detect the syntax of files that might not otherwise be detected properly.
  • DocBlockr - DocBlockr is a Sublime Text 2 package which makes writing documentation a breeze. DocBlockr supports JavaScript, PHP,ActionScript, CoffeeScript, Java, Objective C, C and C++.
  • Emmet for Sublime Text 2 plugin - (This has rocked my world) Emmet (previously known as Zen Coding) is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow. Emmet takes the snippets idea to a whole new level: you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation.
  • jQuery Package - A Sublime Text bundle to help with jQuery Functions.
  • LESS for Sublime - Provides syntax highlighting for .less files.
  • TidyPHP - This is a Sublime Text 2 plugin allowing you to format your PHP code. It uses wp-phptidy, which is a little tool for formatting PHP code to conform the WordPress Coding Standards.
  • Placeholders - This package contains basic HTML placeholder content for Sublime Text 2 e.g. lorem ipsum text, forms, images etc.
  • Search WordPress Codex - Allows you to easily select any function and right click to search for it in the WordPress Codex Function Reference.
  • Sublime Code Intel -Code intelligence plugin ported from Open Komodo Editor to Sublime Text 2. Supports all the languages Komodo Editor supports for Code Intelligence (CIX, CodeIntel2): PHP, Python, RHTML, JavaScript, Smarty, Mason, Node.js, XBL, Tcl, HTML, HTML5, TemplateToolkit, XUL, Django, Perl, Ruby, Python3.
  • Sublime Lint - A framework for inline lint highlighting in the Sublime Text 2 editor.
  • Soda Theme - This provides a UI theme for Sublime Text 2 in either dark or light variants.
  • Sublime Text 2 WordPress - A collection of WordPress snippets and auto-completions ported from the original TextMate bundle.

I also use a slightly modified theme. I found that the default Monokai Bright Theme didn’t handle syntax highlighting of WordPress functions very well. My slight modification just allows syntax highlighting for WordPress functions. You can grab it from gist here.

Well that’s all from me. If you’re using something I have missed then please do let me know in the comments!


Filed under Developer. No comments, on purpose.