Search code examples
phpphpstorm

PhpStorm how to detect/highlight closing "tag" in PHP's alternate syntax of contol structures


Pretty much what the title says. Is there a way to make PhpStorm highlight the closing "tag" when using PHP's alternate syntax for control structures?

Take a look at this sample code for example:

<?
if($x==5) {
    echo "x is equal to 5";
}
?>

If i put the cursor next to or before the opening/closing brace, PhpStorm will automatically highlight the matching opening/closing brace.

Now, if we write the same code but this time using PHP's alternate syntax for control structures, we end up with something like this:

<? if ($x==5): ?>
x is equal to 5
<? endif; ?>

In this case, PhpStorm will not highlight either the opening "if" or the closing "endif;". Is there a way to make it highlight it?


Solution

  • Unfortunately current versions of PhpStorm cannot do that.

    https://youtrack.jetbrains.com/issue/WI-14517 -- watch this ticket (star/vote/comment) to be notified on any progress. So far it has not been associated with any specific future version (not currently planned for implementation).

    Related: https://youtrack.jetbrains.com/issue/WI-566