Reputation: 143785
In vim, pressing * in command mode performs an automatic search of the word under the cursor. How can I obtain the same in Eclipse?
Upvotes: 12
Views: 4099
Reputation: 7779
Windows 10, tested on Eclipse 2020-03
:
Two Steps:
1. Alt + Shift + Up Arrow
, to select the word under the cursor
2. Ctrl + K
to find the selected word forward
(Ctrl + Shift + K to find the selected word backward)
NOTE:
If you are inside an XML tag, Alt + Shift + Up Arrow
will select from the beginning of the tag to the end tag, including all enclosing elements. Try it!
BONUS:
Ctrl + Shift + Down/Up arrows
to navigate methods, as sometimes the selected word is a method you want to go to.
Better still,
Ctrl + O
- Go to a specific method, by searching (Just enter the first few letters of the method, and Enter)
Cheers
Upvotes: 1
Reputation: 14769
Not exactly the same, but maybe helpfull if you work with java. In a .java file you can press
CTRL + SHIFT + u
to find occurences in the same source file.
Upvotes: 0
Reputation: 2232
I also need this functionality and created a small plug-in which adds commands for doing this. You can download it and find more details here: http://eclipselabs.org/p/eclipse-tweaks/
Upvotes: 1
Reputation: 9825
A combination of two keystrokes:
Upvotes: 7
Reputation: 143785
It appears it was not possible in 2004, and it's still not possible, apparently. I'm speechless...
Upvotes: 4