alex2k8
alex2k8

Reputation: 43214

Shortcut key to select word in Eclipse

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

Upvotes: 84

Views: 44887

Answers (4)

Joshua McKinnon
Joshua McKinnon

Reputation: 24709

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 '

Upvotes: 31

Steve De Caux
Steve De Caux

Reputation: 1779

Shift + Alt + selects the word surrounding the cursor

Upvotes: 10

Instantsoup
Instantsoup

Reputation: 15265

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.

Upvotes: 141

GuruKulki
GuruKulki

Reputation: 26418

To select, you can use Shift + Alt + any arrow key.

Upvotes: 3

Related Questions