ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHP Codebeautifier

by Ennosuke ALL

This is a plugin for Sublime Text 3 that gives the option to run the phpcbf

Details

Installs

  • Total 139K
  • Win 94K
  • Mac 24K
  • Linux 22K
Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16
Windows 0 3 6 4 1 5 2 1 4 6 0 3 1 0 4 5 2 0 1 2 4 3 1 3 1 2 5 4 3 5 1 3 2 3 5 4 2 1 1 0 6 6 7 3 4 4
Mac 0 0 1 0 0 2 3 1 1 0 0 1 1 0 2 1 0 0 0 0 1 3 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 2 1 0 0
Linux 0 0 1 0 1 1 2 2 1 1 0 0 0 0 1 0 1 1 2 0 2 1 3 0 0 1 0 0 1 1 1 0 1 0 0 2 1 0 0 0 2 0 0 1 1 0

Readme

Source
raw.​githubusercontent.​com

PHP-Codebeautifier

This is a plugin for Sublime Text 3 that gives the option to run the phpcbf

Prerequisite

You need the PHP Codesniffer more precise the code beautifier from them.

Install

Clone this repo into your Packages folder of Sublime Text. If phpcbf is in your path you don't need to do much setup. Otherwise create a user config for this plugin and set the path to your executable.

{
  "path": "/path/to/your/phpcbf"
}

Please note that the executable has to be in the string.

Usage

The usage is pretty straight forward just press CTRL+ALT+F or use the button in the Tools menu to execute it. For longer files give it a bit to run.

Configuration

Nearly all configuration options from phpcbf are bound to options in the settings file. Please refer to the documentiation for phpcbf to know what they do.

The three most important ones are

  1. path - Sets the path to the phpcbf executable
  2. level - Sets the code standard to follow. Default: psr-2
  3. patch - Sets whenether patch command should be used.