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

PHP Codebeautifier

by Ennosuke ST2/ST3 Trending

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

Details

Installs

  • Total 72K
  • Win 46K
  • OS X 14K
  • Linux 12K
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 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
Windows 3 89 81 61 57 34 38 60 62 63 73 71 32 38 71 56 73 67 52 27 37 47 55 57 66 70 41 43 69 72 73 65 54 46 32 51 60 72 84 52 33 41 67 67 50 60
OS X 0 19 12 17 13 9 11 17 4 18 15 13 5 7 14 13 24 13 11 10 11 8 15 12 10 11 6 4 12 12 13 15 14 8 10 19 19 20 15 17 9 18 16 17 19 17
Linux 2 18 9 14 9 6 9 22 14 14 13 16 10 6 21 17 19 12 8 8 5 17 7 24 12 14 4 8 11 12 17 15 20 9 14 17 17 16 13 16 6 8 21 18 19 25

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.