In vim, pressing * in command mode performs an automatic search of the word under the cursor. How can I obtain the same in Eclipse?
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
A combination of two keystrokes:
It appears it was not possible in 2004, and it's still not possible, apparently. I'm speechless...
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With