标签:
相关链接:http://benmatselby.github.io/sublime-phpcs/
1 : Tools -> Build System -> New Build System
2 : 粘贴以下代码
{
"cmd": ["php", "$file"],
"file_regex": "php$",
"selector": "source.php"
}
3:文件保存为php.sublime-build
附: 配置完成以后,打开一个php文件,按command + b运行当前代码
方法1:Preferences -> Package Control -> Install Package -> Phpcs
方法2:
$ cd ~/Library/Application\ Support/Sublime\ Text\ {N}/Packages/
$ git clone git://github.com/benmatselby/sublime-phpcs.git Phpcs
附:(这里的phpcs只是一个sublime的交互插件)
brew install phpmd
brew install php-cs-fixer
pear install PHP_CodeSniffer
“phpcs_php_path”
“phpcs_executable_path”
“phpmd_executable_path”
“php_cs_fixer_executable_path”
In order to get the path of the application:
$ which php
$ which phpcs
$ which phpmd
$ which php-cs-fixer
$ which phpcbf
标签:
原文地址:http://www.cnblogs.com/dormscript/p/5632648.html