welovewordpress / SublimePhpTidy

Plugin for Sublime Text 2 to format PHP code to meet the WordPress Coding Standards using a modified version of phptidy
GNU General Public License v2.0
109 stars 30 forks source link

PHP code formatter for Sublime Text editor with phptidy

Sublime Text 2

About

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:

http://magp.ie/2011/01/10/tidy-and-format-your-php-and-meet-wordpress-standards-on-coda-and-textwrangler/

Usage

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

Customize

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

Known issues

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

Install

Package Control

The easiest way to install this is with Package Control.

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.