tags:

views:

207

answers:

5

In vim, pressing * in command mode performs an automatic search of the word under the cursor. How can I obtain the same in eclipse ?

A: 

Press Ctrl + k on a Windows machine. On a Mac, Cmd + k should work (seen here).

tangens
It does perform a search, but not of what's currently under the cursor
Stefano Borini
A: 

It appears it was not possible in 2004, and it's still not possible, apparently. I'm speechless...

Stefano Borini
+1  A: 

A combination of two keystrokes:

  1. First, hit Ctrl + Shift + Right Arrow to invoke "Select Enclosing Element". This will select the word under your cursor.
  2. Use Ctrl + K (Cmd + K on OS X) to "find next".
zvikico
A: 

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/

rgerganov
A: 

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.

Arne