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 137K
  • Win 92K
  • Mac 23K
  • Linux 22K
Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11
Windows 0 4 4 11 7 8 7 3 1 5 3 4 8 4 1 6 6 4 8 8 11 4 2 4 3 12 4 4 3 1 8 6 5 2 2 2 7 5 3 6 8 9 6 6 7 6
Mac 0 0 1 2 1 1 3 0 0 1 2 1 0 3 1 0 0 0 1 1 1 1 0 0 1 0 1 1 2 2 1 3 0 3 2 0 1 1 0 2 1 0 0 1 1 0
Linux 0 0 1 2 3 2 1 2 0 0 3 1 1 0 1 1 3 1 2 2 4 2 0 0 2 1 2 0 1 0 2 1 0 2 1 1 2 0 0 2 1 2 1 1 1 2

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.