Accepted answer

after selecting a piece of text:

  • next occurrence is ctrl+k.

  • previous occurrence is ctrl+shift+k.


use ctrl+> or ctrl+<

and it's quite easy to remember because > < works as arrow pointing in the direction where you navigate.


if you are looking to navigate through variables / methods defined in the same class, a quicker way to do this would be to select ( highlight ) the variable / method name you want to navigate to and use alt + shift + r to get into the refactoring mode and then use tab or shift + tab.

  • tab - takes you to the next occurrence

  • shift + tab - takes you to the previous occurrence

this way will save you from reaching mere text matches ( including those in comments ), as how ctrl + k behaves. so you are taken through only "valid" occurrences.


to skip between highlighted occurrences only, try the following:

  • above the editor window, select the down arrow next to the next annotation button.

    button location

  • adjust the selection so that only "occurrences" is marked.

now, when you click on an item to highlight it, you can skip forwards and backwards to other occurrences using ctrl+(comma) and ctrl+(period).

Related Query

More Query from same tag