Sublime Forum

Bracket Highlighter with embedded PHP

#1

When I go out of PHP and into plain HTML it seems to confuse Bracket Highligher. For example:

<?php if ($cat == $dog) { ?> <h3>this is not php code</h3> <?php } ?>
Seems to cause Bracket Highlighter to not recognize the brackets. Any suggestions?

0 Likes

#2

After playing around with this I found a work-around: set PHP Angle to: “enabled”: false This of course disables matching of php tags, but it’s more important to me that the curly brackets will be matched even when going in and out of PHP. Hope this helps someone.

0 Likes

#3

Darn it, still having problems. Sometimes when I select a bracket it just puts a question mark in the gutter and doesn’t find the matching bracket. I checked the same file in Zend Studio and bracket matching works perfectly there, so I don’t think its a problem with my php file. I would rather use ST but I really need to be able to see matching brackets. Anyone else having a problem like this?

0 Likes

#4

Please read github.com/facelessuser/Bracket … /issues/84. It should explain a bit of the behavior found in BH. More than likely what you are experiencing is by design, but also, reading up on these issues may explain to you some of the limitations and why.

0 Likes