Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Plugin for Sublime Text 2 to format PHP code to meet the WordPress Coding Standards using a modified version of phptidy
PHP Python
branch: master

This branch is 37 commits ahead, 3 commits behind scribu:master

Merge pull request #32 from Zodiac1978/patch-1

Adding menu item under Tools for PHP Tidy
Failed to load latest commit information.
.gitignore added .phptidy-cache to .gitignore
.phptidy-config.php Allow custom configurations using the built-in settings.
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap
LICENSE license and readme
Main.sublime-menu Adding menu item under Tools for PHP Tidy
PhpTidy.sublime-commands first version as sublimetext2 plugin
PhpTidy.sublime-settings add default phptidy and setting to select it Update Python 3 + ST3 support, fixes #18
php_tidy.pyc add default phptidy and setting to select it
phptidy-coda.php first version as sublimetext2 plugin
phptidy.php Updated phptidy to 2.11 release
wp-phptidy.php Merge branch 'SingleLineCommentsFix' into CustomConfigFiles

PHP code formatter for Sublime Text editor with phptidy

Sublime Text 2


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.

It is based on the phptidy script by Magnus Rosenbaum.

Modifications were made by Eoin Gallagher and described here:


ctrl + shift + P and type Tidy PHP, or you can use the ctrl + alt + T keybinding.


Custom settings file (for choosing between original phptidy and wp-phptidy).

Known issues

Running phptidy on your file will clear all bookmarks and foldings.


Package Control

The easiest way to install this is with Package Control.

  • If you just went and installed Package Control, you probably need to restart Sublime Text 2 before doing this next bit.
  • Bring up the Command Palette (Command+Shift+p on OS X, Control+Shift+p on Linux/Windows).
  • Select "Package Control: Install Package" (it'll take a few seconds)
  • Select PhpTidy when the list appears.

Package Control will automatically keep phptidy up to date with the latest version.

If you have some problems or improvements with it, contact me via GitHub.

Something went wrong with that request. Please try again.