Sublime Text is a fantastic code editor – far superior and faster than editors I’ve used in the past such as Coda and Espresso.
There are many plugins/packages for SublineText to add features and tailor the experience to your work flow; these are my favourites.
This lets you hit
COMMAND-CTRL-A to align your PHP code with spaces. I usually use it to align my arrays and variables nicely to keep code readable.
DocBlockr eases the creation of docblocks in your PHP code – simply type
/** and hit enter when above a function or class and a blank docblock will be created ready to edit.
I personally use SublimeLinter-PHP the most. This lets you have errors highlighted in your code as your type:
Very handy when debugging, and to find silly mistakes. Just a note on this one, to get it working I had to edit
/etc/php.ini and set
display_errors = On to get it working in Mavericks.
When working in projects with the sidebar visible, this simply highlights/scrolls the sidebar to show the current file you are editing. When I have many files open this does make the sidebar easier to work with.
Sidebar enhancements adds more context menus to your sidebar:
I use reveal and rename quite a bit so this saves time.
Trimmer will strip whitespace from your files when you hit
This package isn’t free, but it is darn useful. Add a
sftp-config.json to your project with FTP connection details, and this extension will allow FTP uploads and downloads. I use this when developing locally, but pushing to a remote server.
Adds auto-completion and snippets for WordPress functions. For forgetful folk🙂
Installing these plugins with Package Control
Every user of Sublime Text should grab this first. Once installed it makes installing other packages a breeze, letting you open the command palette (
SHIFT+COMMAND+P) and then choose “install package” to view and install available plugins.
If you use SublimeText, what packages would you recommend? Share in the comments.