Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Pear Php_beautifier plugin for Sublime Text 2
branch: master

Merge pull request #9 from saivert/patch-1

Hide php_beautifier console window on Windows
latest commit 15a3abe869
James Brooks jbrooksuk authored
Failed to load latest commit information.
.gitignore gitignore
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap
PhpBeautifier.sublime-commands Clean sublime commands
README.md updated install informations
php_beautifier.py use os.name instead of sys.platform

README.md

PHP code formatter for Sublime Text editor with Pear php_beautifier

Sublime Text 2

Php_beautifier

About

This is a Sublime Text 2 plugin allowing you to format your PHP code. It uses php beautifier.

Installation

Install php-pear and php-cli with your package manager :

  • php-pear & php5-cli with Debian
  • php-pear & php with Archlinux

Install php beautifier from pear channel : sudo pear install --alldeps channel://pear.php.net/php_beautifier-0.1.15

Clone or download the files and copy them to your Packages folder. You can access it via Preferences -> Browse Packages in sublime text.

Usage

ctrl + shift + P and type Format: PHP, or you can use the ctrl + alt + f keybinding.

Customize

You can define some options in the script php_beautifier.py. Default options are : PHP_OPTIONS = "-s4 -l 'ArrayNested()' " (indent with 4 spaces and nested arrays).

Something went wrong with that request. Please try again.