Sublime Text WordPress Snippets and Auto-completions

I have become a huge fan of Sublime Text 2 as of late. It’s a simple, yet behemoth-featured editor that allows you to craft your own unique editing experiences. This post is not touting all the wonderful features about Sublime, but if you’re not using it you should be. It’s available for Mac, Windows and Linux.

I primarily develop websites based on WordPress, and I find myself frequenting the Codex on a daily basis to look up parameters that I haven’t memorized. Over time this can amount to a lot of time wasted. Fortunately for me and you, there is a Sublime WordPress package ready for you to install in mere seconds. This gives us a lot of WordPress goodness at our fingertips right in the editor.

To install through Package Manager, type CMD-SHFT-P (Macs) and ‘Type Package Control: Install Package’. Wait for the package search dialogue to appear then type ‘WordPress’ and hit enter. Boom. Done.

To take advantage of all the new WordPress goodness, simply type a WP-specific function and hit tab to auto-complete. Repeatedly hitting tab will move through the function parameters. There is also snippet goodness as well. You can take a look at all of the snippets and auto-completions here.

For instance if you would like to insert a plugin header, make sure you are in PHP syntax mode and type ‘plugin_head’ and then hit tab. In the CSS syntax mode, you can type ‘theme_head’ and move through all of the definitions with the tab key.

This is not even the tip of the tip of the tip of the iceberg with Sublime. Here’s a great course on what Sublime can do for you and your workflow.

If you would like to install the WordPress Sublime package manually, go to: https://github.com/purplefish32/sublime-text-2-wordpress and clone the repo to your package library.