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) ?
If the highlighting of usages is disabled, press Ctrl+Shift+F7 to highlight all usages in the file. From the main menu, select Edit | Find Usages | Find Usages in File Ctrl+F7. IntelliJ IDEA selects the first usage occurrence in the file. With the Ctrl+F7 you can also highlight the exception name and places where the exception is thrown.
From the main menu, select Edit | Find Usages | Find Usages in File Ctrl+F7. IntelliJ IDEA selects the first usage occurrence in the file. With the Ctrl+F7 you can also highlight the exception name and places where the exception is thrown. Use the F3 and Shift+F3 shortcuts to navigate between highlighted symbols.
Search for usages in a file In the editor, select a symbol you want to find, IntelliJ IDEA automatically highlights all found usages in the file. If the highlighting of usages is disabled, press Ctrl+Shift+F7 to highlight all usages in the file. From the main menu, select Edit | Find Usages | Find Usages in File Ctrl+F7.
If the search results have too many entries, then IntelliJ IDEA shows the first hundred usages found and the more usages option on the bottom of the window which you can click to display another hundred usages, and so on until the search is finished. Use filters on the top of the window to show or hide the certain search entries.
https://plugins.jetbrains.com/plugin/201-browsewordatcaret
From the plugin description:
Allows to easily browse next/previous word at caret and highlight other appearances of selected word.
I'm using it and it works perfectly.
The following worked for me in IntelliJ 2018.2.3:
Disable automatic highlighting of usages by unchecking:
Preferences | Editor | General | Highlight usages of element at caret
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With