Sublime Text 2 has become my favourite editor for many reasons.
It is a great editor out of the box, however there are a few packages that can really make it fly. The ones I mention in this post are especially target towards WordPress development.
First I suggest you download the Package Control packageΒ which will give you a better interface for adding and managing plugins.
To install packages with the Package Control Package, click CTRL+SHIFT+P, then type Package Control: Install Package.
Sublime 2 WordPress Package
Sublime Text 2 WordPress Package is a collection of WordPress snippets and autocompletions for Sublime Text 2.
SublimeXDebug
Simple client to connect with XDebug.
One thing I haven’t gotten to work as smoothly as I had with Komodo IDE, is debugging via Xdebug. There is however a package which adds Xdebug facilities to Sublime Text.
PhpTidy
This is a Sublime Text 2 plugin allowing you to format your PHP code.
Search WordPress Codex
As the name suggests,Β Search WordPress CodexΒ lets you search the WP Codex from within the editor. Furthermore, you can right-click on any given function within the code, and it can take you to the functionβs reference page in the Codex. It can be super useful if you need to refer to the Codex regarding a given function or coding style.
DocBlockr
DocBlockr is aΒ Sublime Text 2Β package which makes writingΒ JSDoc commentsΒ andΒ PHPDoc commentsΒ a breeze.
WordPress New Project Config
WordPress New Project ConfigΒ can save you a lot of time each time you start a new WP project. As such, this script can create a new folder with the project name, install the latest WordPress build automatically, fetch and install your chosen starter theme, eliminate default WP themes and the Hello Dolly plugin, create a database and table and finally, launch your project in Sublime Text 2.
It uses wp-phptidy, which is a little tool for formatting PHP code to conform theΒ WordPress Coding Standards.
SublimeHTMLTidy
This is a Sublime Text 2 plugin allowing you to clean and tidy up your HTML code.
It uses a version ofΒ libtidy
, which comes bundled with PHP 5.
SublimeWordPressCodex
This is a Sublime Text 2 plugin allowing you to easily search the WordPress Codex.
Most of all it let’s you right-click on any WordPress function and select ‘WordPress Function Reference’ to open the Codex page forΒ thisΒ function.
SublimeText2StackOverflow
Same as previous but connects to Stack Overflow
Genesis
If you are working on WP theme development using the Genesis framework, this particularΒ Sublime Text extensionΒ might be useful for you, as it contains aΒ bunch of handy snippetsΒ that you can use Genesis child theme development that little bit easier.
SublimeLinter
SublimeLinter is a plugin that supports “lint” programs (known as “linters”). SublimeLinter highlights lines of code the linter deems to contain (potential) errors. It also supports highlighting special annotations (for example: TODO) so that they can be quickly located.
BracketHighlighter
This is a fork of pyparadigm’s SublimeBrackets and SublimeTagmatcher.
SublimeText2Git
Git integration: it’s pretty handy. Who knew, right?
Sublime Alignment
A simple key-binding for aligning multi-line and multiple selections inΒ Sublime Text 2.
Here are some excellent articles about using Sublime Text 2 for PHP and WordPress development
http://clintberry.com/2012/sublime-text-2-php-symfony-development/
http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
Also make sure you checkout this free video series on how to set up your workflow in Sublime Text 2:
https://tutsplus.com/course/improve-workflow-in-sublime-text-2
If you enjoyed this post, make sure to subscribe to WPMayor’s RSS feed.
9 Responses
fwiw, I’ve written a how-to that shows how to use xdebug with sublime text and wordpress, it’s at
Hey there, just wanted to drop by and let everyone know I’ve made a plugin for Sublime Text 2 and 3 that allows you to edit posts, pages, custom post types, settings, and taxonomy terms for a WordPress site from within Sublime. You can also upload a media attachment and assign it as a featured image on a post or page.
You can find out more here:
I’m looking for feedback and comments on how it can be improved or how you can see yourself using it. Thanks! π
That’s very very interesting Nic, thanks for letting us know about it!
Hey Jean!
Thanks for talking about WordPress New Project Config!
I would like to clarify that the script is not a Sublime package
It’s a shell script which do a lot of other things and in the configure a sublime project and lauch the app
I Would like to add that it doesn’t use wp-phptidy too.
Best,
j
thanks a lot for great packages π
Back with more. Speckyboy recently did a list at
There are 4 plugins not mentioned here (really 5 but one doesn’t make sense since it’s for TextMate, not Sublime):
> Sublime Text Snippet Library For WP
> Sublime Text Snippets
> WordPress Readme to Markdown
> CSSFormat (not specifically WP)
Overall your list more complete only missing these 3 or 4, whereas theirs is missing 6 listed here.
Thanks for the extra list DJ, nice stuff!
Thanks, great find with the Genesis package!
Great article. I’m trying this out as outlined. Currently I use PhpStorm for most of my WordPress stuff.
One additional plugin I discovered for Sublime is “Genesis” to add framework snippets if you happen to use the framework.
DJ