Btw, there is a way we can reward you for the awesome job you do? A paypal account maybe?
iamntz wrote:Man, you are awesome! Thanks a lot, now looks beautiful!
Btw, there is a way we can reward you for the awesome job you do? A paypal account maybe?

vitaLee wrote:@facelessuser is that a custom color scheme you're using?
care to share?
open": "(^if|foreach|while.+:$)",
"close": "(^endif|endforeach|endwhile;$)","open": "(^if.+:$)",
"close": "(^endif;$)",

iamntz wrote:Ok, so, as i said, me dumb
I'm trying to make ST to also highlight if/endif foreach/endforeach and so on in php. What i have now (after like 50 different combinations or so) is this:
- Code: Select all
open": "(^if|foreach|while.+:$)",
"close": "(^endif|endforeach|endwhile;$)",
But will not match correctly what i need (php have two ways of doing blocks; one is with if/endif and the other is with curly braces)
However, if i'll do only this:
- Code: Select all
"open": "(^if.+:$)",
"close": "(^endif;$)",
works good...ish. Because will make things red (which is an error) when i focus inside of the condition:
While things are peachy when i'm inside of the block:
What do i do wrong?
Thanks!
{
"name": "php_keywords",
"open": "^\\s*(if|foreach|while.+:$)",
"close": "^\\s*(endif|endforeach|endwhile;$)",
"icon": "dot",
"color": "brackethighlighter.tag",
"style": "underline",
"language_filter": "whitelist",
"scope_exclude": ["string", "comment"],
"language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"],
"plugin_library": "User.phpkeywords",
"enabled": true
},
def compare(name, first, second, bfr):
return "end" + bfr[first.begin:first.end] == bfr[second.begin:second.end]
def compare(name, first, second, bfr):
opening = bfr[first.begin:first.end]
closing = bfr[second.begin:second.end]
match = False
if opening.startswith("while"):
if closing.startswith("endwhile"):
match = True
else:
match = "end" + bfr[first.begin:first.end] == bfr[second.begin:second.end]
return match
vitaLee wrote:is it a default behaviour for Sublime to add icon in the gutter for each line of a multiline underlined (*mouthful*) region, or it's something you control?
i found myself exploitinhg BH2 in attempt to match Obj-C @interface @implementation directives and noticed if i use style:underline for each line of the opening "bracket" there's an icon in gutter, while the same is not true for outline, solid (icon only on first line).
"open": "^\\s*(if|foreach|while).*:$",
"close": "^\\s*(endif|endforeach|endwhile;$)"
Return to Plugin Announcements
Users browsing this forum: Google [Bot] and 3 guests