Glide
Glide

Reputation: 21275

Intellij ctrl+w equivalent shortcut in Eclipse

In IntelliJ, if the editor cursor is in the middle of a word like this w|ord and you press Ctrl+W, it will highlight the whole word which allows you to highlight the whole word without moving the cursor to the end or the beginning of the word then do ctrl+shift+left/right arrow.

Is there an equivalent shortcut in Eclipse?

Upvotes: 26

Views: 5516

Answers (4)

oshai
oshai

Reputation: 15375

in eclipse use ALT+SHIFT+ or arrow

Upvotes: 4

Boris Brudnoy
Boris Brudnoy

Reputation: 2460

While previous answers cover what to look for in Eclipse, this answer is to document restoring this useful shortcut set. In Eclipse Mars, for example, I found these shortcuts initially unbound.

To (re)enable, therefore, the Ctrl+Shift+up and Ctrl+Shift+down (using Mac shortcuts by way of example), open Eclipse preferences, find the Keys section, and look for the following:

  • Select Enclosing Element (to bind Ctrl+Shift+up to)
  • Restore Last Selection (to bind Ctrl+Shift+down to)

Upvotes: 0

javilaureano
javilaureano

Reputation: 846

You are looking for Alt+Shift+Up (Select Enclosing Element)

I'm using Eclipse Helios and you can change de shortcut in Window->Preferences->General->Keys

Upvotes: 39

Victor Grazi
Victor Grazi

Reputation: 16520

On Mac it is Ctrl+Shift+up and Ctrl+Shift+down

However, in any platform it is not nearly as clever as IntelliJ's Ctrl+W

For example, when you are inside a bracket, Ctrl+W excludes the brackets, whereas Eclipse includes the brackets, so there is no easy way to select everything within a bracket. It's the same problem with quotes.

Upvotes: 3

Related Questions