天天看點

Sublime Text 3 配置 PHPCS 插件

Download php code sniffer addon via Package Control in ST3.

Download The php-cs-fixer File From This Website => cs.sensiolabs.org/ (Direct Link => cs.sensiolabs.org/get/php-cs-fixer.phar)

Copy Downloaded File To Your php.exe directory (mine is C:/XAMMP/php/php.exe)

download PHP_CodeSniffer PEAR code package from this page pear.php.net/package/PHP_CodeSniffer/download/All (Direct Link => http://download.pear.php.net/package/PHP_CodeSniffer-1.5.0RC4.tgz)

find PHP_CodeSniffer-1.5.0RC4.tgz\PHP_CodeSniffer-1.5.0RC4\scripts\phpcs.bat and copy this file too (in your php.exe directory)

copy the first post's config file, change your directory accordingly while writing in Package Settings -> Php Code Sniffer -> Settings - User File. This Method Worked For Me On Sublime Text 3 Build 3047 In Win8 x64 System... No more slow ST2 for me... Cheers