PHP Selective format uses php-cs-fixer to format selection of php code
Steps to use
- Install php cs fixer
curl -L http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o /tmp/php-cs-fixer
sudo chmod a+x /tmp/php-cs-fixer
sudo mv /tmp/php-cs-fixer /usr/local/bin/php-cs-fixer
- Clone the repo insidei sublime package
git clone git@github.com:sarathsp06/sublime-php-selective-format.git $HOME/.config/sublime-text-3/Packages/SelectivePHP
- Usage select and press "Ctrl+Alt+F" to format