Intellij IDEA highlight all occurrences of selected text

Viewed 9947

Currently, intellij highlights all occurrences of the word under the caret. How can I change it so that it doesn't do that, and instead will highlight all occurrences only when I select the word (eg: similar to sublime text) ?

4 Answers

The following worked for me in IntelliJ 2018.2.3:

  1. Disable automatic highlighting of usages by unchecking:

    Preferences | Editor | General | Highlight usages of element at caret
    
  2. Add mouse shortcut for Highlight Usages in File:

    Preferences | Keymap | Main menu | Edit | Find | Highlight Usages in File
    

My mouse shortcut was: Shift + Control + Double Click

I am using Webstorm 2021.2 at the moment and this feature is working. Just for your information. Hope you also already updated to the latest.

Settings -> Editor -> Code Editing -> Highlight on Caret Movement -> Usages of element at caret

Related