Search code examples
phpstormwebstormsyntax-highlighting

How to make PhpStorm/WebStorm scope highlighting look more expressive?


When I first learned Java, I was using an IDE called "BlueJ." It had this feature called "Scope Highlighting" which made it very easy to read blocks of code. See picture below:

Scope Highlighting BlueJ

As you can see on the first picture, on BlueJ the whole Background of a scope is highlighted with one color.

In PhpStorm or even in most of IDE's today, I get only a highlighting for a scope, which I set the cursor on, and only in a very minimalist way, as you can see on the left side of the picture below:

Scope Highlighting PHPStorm

Is there a way, or a Plugin for PhpStorm out there, to get it to look more like BlueJ's scope Highlighting???

Thanks

edit:

What I've have found out so far: There is something alike for HTML, (Setting>Editor>General>Appearance:Enable HTML/XML tag tree highlighting:Set opacity higher than 0) Then you will get this:

HTML Tag tree Highlighting

Something like this for the other languages (PHP, JS,...) would make me really happy :)


Solution

  • So far I have found two solutions for this.

    1. The plugin Rainbow Brackets, makes it easier to visually find the corresponding bracket. enter image description here

    Also, it provides the option to highlight the current scope by Ctrl + Right Mouse Click or Ctrl + Shift + Plus. The name of the Shortcut is: Plugins | Rainbow Brackets | Highlight Current Scope and the highlighting looks like this:

    enter image description here

    1. The built-in shortcuts to jump to the matching bracket or the one at the code block start/end. Though it does not highlight anything, you can quickly find the matching bracket. Check your ide-settings for the shortcut: Editor Actions | Move Caret to Matching Brace / Editor Actions | Move Caret to Code Block End / Editor Actions | Move Caret to Code Block Start