IntelliJ navigate to next and previous highlighted variable
In IntelliJ 10.5 I have "Highlight usages of element at caret" enabled. When a variable/method/etc is selected, is there a way to move to the next and previous occurrence? I'm looking for the equivalent of Control-K in Eclipse.
Edit: Shortcut to navigate between highlighted usages simply moves to the next text occurrence, which is different than moving to the next occurrence of the variable/method/etc. If I have the variable foo
selected, I want to navigate to the next occurrence of foo
and not any piece of text called "foo" (including "foo" in comments, method names, etc).
Also, pressing F3 seems to be buggy. When I press F3, it sometimes searches using the previous searched text and not the currently highlighted text.
Solution 1:
- F3 or shift+F3
- ctrl+c, ctrl+f, enter or up and down arrows
- ctrl+alt+F7
Added this in case people don't look at your edit.
Solution 2:
It's not currently possible, see my question: Shortcut to navigate between highlighted usages.
I even created an issue IDEA-70523 addressing this feature, please vote for it if you can't live without it like me :-).
Solution 3:
Install Identifier Highlighter Reloaded and use Alt + Shift + Up/Down (can be redefined in Keymap settings) :)
After you give it a shot and notice the 'hey, the highlight stays there after I move my cursor out of it' annoyance, consider upvoting this issue :)
Solution 4:
Vote this request up for make them implement the feature.
http://youtrack.jetbrains.com/issue/IDEA-59638
Solution 5:
I found something thay may more suite your needs : alt + mouse-wheel up/down.
It goes to previous / next occurrence of identifier under caret.
Shortcut name is "Go to next highlighted element usage".