IntelliJ navigate to next and previous highlighted variable

后端 未结 10 2234
野的像风
野的像风 2020-12-14 05:31

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?

相关标签:
10条回答
  • 2020-12-14 06:08

    I could not get any of IntelliJ's native options for Find Next/Previous to behave like in Eclipse. Find Word at Caret comes close, but it only allows you to slurp and find the next word, not previous.

    Identifier Highlighter Reloaded also does not behave like Eclipse.

    I wrote an IntelliJ plugin to reproduce the exact behavior as in Eclipse. You can find it here: https://plugins.jetbrains.com/plugin/10635-quick-find-plugin

    0 讨论(0)
  • 2020-12-14 06:11

    (AFAIK, limiting search scope to only variable/method is not possible)

    For text based match and quick jump:

    1. Simply place the cursor over the desired word to be searched
    2. Press Ctrl+F3
    3. For further down/up search, simply use F3/Shift+F3 respectively
    0 讨论(0)
  • 2020-12-14 06:12
    • 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.

    0 讨论(0)
  • 2020-12-14 06:16

    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 :-).

    0 讨论(0)
提交回复
热议问题