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",}
下面是我自己的配置:
{"format_on_save":false,"php_bin":"E:/GreenApp/php/php-7.0.9/php.exe","psr1":true,"psr1_naming":true,"psr2":true,"version":1}