That was an old post, some things have changed since. I would try something like this in your bh_core.sublime-settings file (make a copy of it in your ST2 User folder and edit the User copy):
You can see here, I have added the PHP conditional keywords definition after the C/C++ compile switches under the setting entitled brackets.
[pre=#2D2D2D] // C/C++ compile switches
{
“name”: “c_compile_switch”,
“open”: “(\#(?:if|ifdef|ifndef))\b”,
“close”: “(\#endif)\b”,
“style”: “default”,
“scope_exclude”: “string”, “comment”],
“language_filter”: “whitelist”,
“language_list”: “C++”, “C”],
“enabled”: true
},
// PHP conditional keywords
{
“name”: “php_keywords”,
“open”: “^\s*\b(if|foreach|for|while|switch)\b(?=.:$)",
“close”: "^\s\b(endif|endfor|endforeach|endwhile|endswitch)\b(?=;$)”,
“style”: “default”,
“language_filter”: “whitelist”,
“scope_exclude”: “string”, “comment”],
“plugin_library”: “User.phpkeywords”,
“language_list”: “HTML”, “HTML 5”, “XML”, “PHP”, “HTML+CFML”, “ColdFusion”, “ColdFusionCFC”],
“enabled”: true
}
],[/pre]
Lastly, you create a file called phpkeywords.py in your ST2 User folder with this code:
[pre=#2D2D2D]def compare(name, first, second, bfr):
return “end” + bfrfirst.begin:first.end].lower() == bfrsecond.begin:second.end].lower()[/pre]
If I remember, I will add this by default into BracketHighlighter tonight.