sublime text3 phpfmt插件使用

https://www.eertime.com/archives/86.html


通过包安装管理器安装phpfmt插件.

  • 在sublime界面按快捷键 ctrl+shift+P
  • 选择并选择: Install Package
  • 等待片刻输入并选择 phpfmt

配置 (Windows)

打开并编辑配置文件 ( %AppData%\Sublime Text\Packages\phpfmt\phpfmt.sublime-settings )(建议编辑插件的用户配置)
将 "php_bin" 的值设置为你电脑上php.exe的路径。 例如: "php_bin":"c:/PHP/php.exe"
配置好之后默认ctrl+F11格式化代码,也可以通过命令面板来操作


配置 (OS X and Linux)

编辑配置文件 ( phpfmt.sublime-settings )将 "php_bin" 的值设置为你电脑上php的可执行程序路径。 例如: "php_bin":"/usr/local/bin/php"

设置

{
    "php_bin":"/usr/local/bin/php",
}

English

Install this plugin through Package Manager.
•In Sublime Text press ctrl+shift+P
•Choose Package Control: Install Package
•Choose phpfmt

Configuration (Windows)

•Edit configuration file ( %AppData%\Sublime Text\Packages\phpfmt\phpfmt.sublime-settings )
•For field "php_bin" enter the path to the php.exe Example: "php_bin":"c:/PHP/php.exe"

Configuration (OS X and Linux)

•Edit configuration file ( phpfmt.sublime-settings )•For field "php_bin" enter the path to the php Example: "php_bin":"/usr/local/bin/php"

Settings

Prefer using the toggle options at command palette. However you might find yourself in need to setup where PHP is running, use this option below for the configuration file.

{
    "php_bin":"/usr/local/bin/php",
}

参考网址
github:https://github.com/nanch/phpfmt_stable
package control:https://packagecontrol.io/packages/phpfmt

下面是我自己的配置:

{
    "format_on_save": false,
    "php_bin": "E:/GreenApp/php/php-7.0.9/php.exe",
    "psr1": true,
    "psr1_naming": true,
    "psr2": true,
    "version": 1
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值