我正在尝试为ST3使用php-fmt插件,我安装了它,但是当我使用它时它没有做任何事情.我想我设置的一切都正确,但PHP文件没有得到任何格式.我可以在命令行上使用PHP ...我按照设置进行操作.我在OSX上,使用MAMP php 5.5.10
如果我使用命令'analyze'我得到消息
Autocomplete and autoimport need building a database of terms.
Please, fill in below with the proper location for this database.
Keep in mind that the best location is always the root of the project, therefore limiting the size and ensuring speed.
Run Code Online (Sandbox Code Playgroud)
如果你知道为什么它不起作用,请帮助或建议格式化PHP代码的替代方法谢谢!
在菜单上,转到首选项>程序包设置> phpfmt>设置 - 用户
编辑将在上一个操作的结果中打开的文件.
根据你的php二进制位置指定"php_bin",
它应该包含这样的东西:
{
"enable_auto_align": false,
"indent_with_space": true,
"passes":
[
],
"php_bin": "/Applications/MAMP/bin/php/php5.5.10/bin/php",
"psr1": true,
"psr2": true,
"version": 2
Run Code Online (Sandbox Code Playgroud)
}