phpfmt support for Sublime Text 3 for Windows
This project follows a Code of Conduct.
- You must have a running copy of PHP on the machine you are running Sublime Text
Plugin runs with PHP 7.0 or newer installed in the machine running the plugin.
- 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"
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":"c:/PHP/php.exe"
}
Before | After |
|
|
|
|
|
note how it sorts the use clauses, and removes unused ones |
- GoSublime - for the method to update the formatted buffer
- Google's diff match patch - http://code.google.com/p/google-diff-match-patch/