6

Normally in PHPStorm if I click on a variable, other instances of that variable will get highlighted.

However, I somehow made changes to the settings, and for some reason led to this not happening anymore. Does anyone know where I can revert this such that variable instances will get highlighted once again?

Makoto
  • 104,088
  • 27
  • 192
  • 230
pillarOfLight
  • 8,592
  • 15
  • 60
  • 90
  • You might have the search (and replace) bar on top opened. Close it. Also for the many question you ask "by fly-by": Learn how you can backup your PHPStorm configuration and restore it. Also how to reset all options. – M8R-1jmw5r Apr 11 '13 at 23:45
  • 1
    possible duplicate of [IntelliJ: How to auto-highlight variables like in Eclipse](http://stackoverflow.com/questions/3763183/intellij-how-to-auto-highlight-variables-like-in-eclipse) – CrazyCoder Apr 12 '13 at 11:31
  • @CrazyCoder Hmm, I don't think that this is a duplicate as I'm having the same problem. Suddenly variable highlighting at caret stopped working. I re-checked it multiple times and also restarted the IDE. Unfortunately that didn't help. (PHPStorm 6.0.3, #PS-129.814) – flu Jul 03 '13 at 10:38

2 Answers2

6

Make sure that the File Analysis isn't set to "Power Saving Mode".

There's a small police officer in the bottom right of your PHPStorm window that shouldn't be grayed out.

Highlighting Level Icon and Dialog

If it is grayed out then you have disabled inspection/highlighting.

To re-enable it either click on the icon (which opens the dialog from the picture) or press Ctrl+Alt+Shift+h (on windows) which is the shortcut for "Configure Current File Analysis..." and opens the same dialog.

There simply uncheck the check box "Power Save Mode".


Note: The Highlighting Level rulers are in fact saved for every file independently but the Power Save Mode checkbox is global. And while "Power Save Mode" implies that it might check occasionally instead of all the time it seems that this disables inspection entirely and thus might be better off labeled something like "Disable inspection globaly".

flu
  • 14,307
  • 8
  • 74
  • 71
5

Settings | Editor | [x] Highlight usages of identifier at caret

yole
  • 92,896
  • 20
  • 260
  • 197
  • 1
    I already have Highlight usages of identifier at caret checked off but it still wouldn't highlight...any ideas? – pillarOfLight Apr 17 '13 at 18:31
  • I tried changing my theme (Settings>Appearance>UIOptions), applying and then changing it back again and that fixed your issue. – strangeQuirks Oct 28 '14 at 14:30