Shortcut key to select word in Eclipse
EclipseEditorKeyboard ShortcutsEclipse Problem Overview
Is there any keyboard shortcut to select a word? Or may be it can be assigned some how?
Eclipse Solutions
Solution 1 - Eclipse
Shift + Alt + ↑ selects enclosing elements.
Shift + Alt + ↓ reverses Shift + Alt + ↑.
Shift + Alt + ← selects enclosing elements moving up the file.
Shift + Alt + → selects enclosing elements moving down the file.
Solution 2 - Eclipse
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. (If you press he Key Assist shortcut twice, you'll get the Keys Preferences page, which allows you to reassign shortcuts.)
String |myFancyString = "FooBar";
If your cursor is immediately to the left of 'm' (I am indicating this with a pipe (|)) :
-
Shift + Alt + → (Select Next Element) would select 'myFancyString'
-
Shift + Alt + ← (Select Previous Element) would also select 'myFancyString'
-
Ctrl + Shift + → (Select Next Word) would select 'my', repeating it would select 'myFancy', followed by 'myFancyString '
Solution 3 - Eclipse
Shift + Alt + → selects the word surrounding the cursor
Solution 4 - Eclipse
To select, you can use Shift + Alt + any arrow key.