PHP / Other Template Editing HTML background color

Is there any way to style the background of the HTML portions of a PHP (or JSP or GSP) template differently than the code portions?  For example, something similar to the injected language highlighting.

I'm using IntelliJ IDEA 10.5.

What might be even better is to have some sort of highlighting shift based on focus.  I can't remember which tool I was using, but one of them would "fade" the code portions when editing the HTML and vice-versa.  It really helps in editing complex (and, admittedly bad) templates.

If this isn't already available, I'll make a suggestion for the IDEA team.

2 comments
Comment actions Permalink

Ah, the power of posting...

Apparently it was right in front of my face.  Under PHP coloring, you can change the background of PHP code.

This works somewhat, however, it means that all PHP code has the different background than all my other code.  It also prevents the caret row background color from showing.  Personally, I'd rather have some universal background changes for languages that have mixed code and HTML.

0
Comment actions Permalink

Hi Phil,

This works somewhat, however, it means that all PHP code has the different background than all my other code.

It is so unfortunate -- I also would like to have it working in that way (have bg color only in mixed code)

It also prevents the caret row background color from showing.

It's a known problem (5 years old ticket) -- see/vote these tickets & maybe one day in not too distant future it get fixed ...

http://youtrack.jetbrains.net/issue/IDEA-63712?projectKey=IDEA&query=caret+background
http://youtrack.jetbrains.net/issue/IDEA-30322?projectKey=IDEA&query=caret+background

0

Please sign in to leave a comment.