Search code examples
eclipseeclipse-cdt

Eclipse CDT : C++ Editor window, select word under cursor?


I am using Eclipse after coming from a well known commercial IDE. I am struggling with a very simple user requirement.

I want to search for the word under the cursor with one key press!

The only way I know to select the element at the cursor is mouse double click. CTRL-LEFT/RIGHT, moves the cursor to start/end of the current word, with a SHIFT selecting as it goes. This means you need to CTRL-LEFT, CTRL-SHIFT-RIGHT - CTRL-K to do a search.

So if I can map the double click functionality to a keyboard key, my problem is solved - "Mapped Key" + CTRL-K.


Solution

  • The menu option Edit | Find Word does what you want. It doesn't have any keybinding by default, but you can add one in Window | Preferences, General -> Keys