Sublime Forum

Edit syntax definition for ST3

#1

I’m on OS X.

Can someone tell me where the syntax definition file is for PHP? The docs say it’s a list of regex expressions but I can’t seem to find it.

BTW, the PHP syntax has an annoying bug: myFunc() will highlight correctly, but $myFunc() will not (storing and invoking anonymous functions is supported by the language but sublime text doesn’t highlight the “$” when parentheses are attached).

0 Likes

#2

You can find it in /Applications/Sublime Text.app/Contents/MacOS/Packages/

It’s a file called PHP.sublime-package you can make a copy of it and rename it to PHP.zip and unzip it to edit files. From there you should be abled to add any of the modified files in User/PHP/

There’s a package that helps ease editing core packages, I’ve not used it, but looks like it’d be handy sublime.wbond.net/packages/Pack … urceViewer

0 Likes