Ennosuke / PHP-Codebeautifier

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

License:MIT License


Languages

Language:JavaScript 65.4%Language:Python 34.6%