How do I go to “next occurrence” in Eclipse

后端 未结 5 1991
执笔经年
执笔经年 2021-02-01 17:30

In Eclipse you can turn on \"Mark Occurrences\", and then it will highlight every occurrence of a given variable in the current scope. That\'s great, but I\'d really like to mo

5条回答
  •  暖寄归人
    2021-02-01 17:44

    You can do this to maybe reduce some keystrokes/mouse clicks in selecting the initial word:

    1. Put the cursor on the word you're looking for
    2. Hit alt + shift + up
    3. Hit ctrl + k

    This highlights the current word and then does a find next. It doesn't seem to be case-sensitive, though, but that's a small price to pay.

    There are definitely some places it doesn't work, though. Like class and implements in the following (it highlights the whole class):

    public class MyClass implements MyInterface {}
    

提交回复
热议问题