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 108K
  • Win 71K
  • Mac 19K
  • Linux 18K
Feb 29 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 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
Windows 14 24 36 42 51 34 24 22 30 39 47 32 50 22 29 34 30 36 43 39 20 31 35 36 40 40 34 27 23 32 32 43 35 30 22 16 32 36 38 37 32 19 30 31 44 37
Mac 4 6 6 7 6 5 6 3 3 6 7 6 5 1 6 4 5 8 13 7 4 2 6 2 9 12 10 3 8 5 3 6 2 7 3 3 8 7 4 6 9 8 4 7 8 5
Linux 0 9 5 12 6 5 6 9 9 12 16 5 15 2 9 10 13 18 13 12 6 7 7 14 12 16 4 3 6 8 16 12 13 6 6 7 6 17 8 9 10 4 3 8 8 8

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.