Last active
March 13, 2018 12:24
-
-
Save fabianmarz/83c6148cb2f7a1b0134274170c52ed39 to your computer and use it in GitHub Desktop.
File should be placed in: `~/Library/Application Support/Sublime Text 3/Packages/User/`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
/** | |
* Create a custom [build system](http://bit.ly/17IKkU9) to provide PHP syntax checking. | |
* Save this file as ~/.config/sublime-text-2/Packages/User/PHP.sublime-build | |
* | |
* Usage | |
* - In the editor, select a tab with PHP source code. | |
* - Press F7 or CTRL + B to run PHP syntax check. | |
* - The status will be be displayed in the console at the bottom. | |
* - If it shows error, press F4, and the editor cursor will be brought to the relevant line in the source code. | |
*/ | |
{ | |
"cmd": ["/Applications/MAMP/bin/php/php7.0.8/bin/php", "-d display_errors=1 -l", "$file"], | |
"file_regex": "^PHP Parse error: .+ in (\\S+) on line (\\d+)", | |
"line_regex": "^PHP Parse error: .+ in \\S+ on line (\\d+)", | |
"selector": "source.php" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment