In Sublime Text 2, how do I highlight any code which is between <?php and ?>

1

I'm coding in php for a Wordpress project at the moment and using Sublime Text 2. It's great, however, I would love to be able to quickly see what is php and what is html (also javascript, but that is secondary).

Here is an example:

<tr>
<?php
    foreach ( $team_users as $team_user){
?>
    <th><?=$team_user->display_name?></th>
<?php
    }
?>
</tr>

If the background color would be different between what is php code and what is html it would make the code much more readable:

Illustration of highlighting

I know that in my example I could just echo out the header to lose some of the php tags, that's beside the point.

Any suggestions?

André Christoffer Andersen

Posted 2014-07-30T10:31:14.307

Reputation: 287

No answers