views:

407

answers:

4

Is there any keyboard shortcut to select a word? Or may be it can be assigned some how?

A: 

To select u can use shift - alt - any arrow key

GK
+4  A: 

SHIFT-ALT-UP selects enclosing elements.

SHIFT-ALT-DOWN reverses SHIFT-ALT-UP.

SHIFT-ALT-LEFT selects enclosing elements moving up the file.

SHIFT-ALT-RIGHT selects enclosing elements moving down the file.

Instantsoup
+2  A: 

SHIFT-ALT-RIGHT selects the word surrounding the cursor

Steve De Caux
That, I believe, is the right answer. +1
VonC
+3  A: 

The quickest way to find any keyboard shortcut in Eclipse is to use Help->Key Assist (or CTRL+SHIFT+L), which will pop up a nice tooltip with keyboard shortcuts and what they do.

String |myFancyString = "FooBar";

If your cursor is immediately to the left of 'm' (I am indicating this with a pipe (|)) :

  • ALT+SHIFT+RIGHT (Select Next Element) would select 'myFancyString'
  • ALT+SHIFT+LEFT (Select Previous Element) would also select 'myFancyString'
  • CTRL+SHIFT+RIGHT (Select Next Word) would select 'my', repeating it would select 'myFancy', followed by 'myFancyString '
Joshua McKinnon
Thank you Joshua for that info!
alex2k8