Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 234
Steve Kuo Avatar asked Jun 08 '11 15:06

Steve Kuo


People also ask

How do I go to previous selection in IntelliJ?

To navigate backwards, press Ctrl+Alt+Left . To navigate forward, press Ctrl+Alt+Right . To navigate to the last edited location, press Ctrl+Shift+Backspace .

How do I forward and back arrows in IntelliJ?

Use ⌘[ (macOS), Ctrl+Alt+Left Arrow (Windows/Linux) to navigate backwards and ⌘] (macOS), Ctrl+Alt+Right Arrow (Windows/Linux), to navigate forwards.

What is Ctrl Shift O in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.

What is Ctrl h in IntelliJ?

Ctrl + H = "Type Hierarchy" view = shows a tree of parent and child classes of this class. Ctrl + Shift + A = "It does a search as you type through all the commands in intellij. Not only that but when you find the command you want it also displays the corresponding shortcut key next to it!"


1 Answers

  • 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.

like image 140
Tom Avatar answered Dec 07 '22 21:12

Tom