In Microsoft tools such as Word and Visual Studio, there is a feature to select text in a rectangle manner by pressing the Alt key while selecting. Is there anything like that in Eclipse?
In Eclipse (I'm using Eclipse June 4.2. 2 at the moment), it is possible to select columns/vertical blocks of text by using Alt+Shift+A to switch to block selection mode. You can then drag over a column/block of text. With a block selected, typing text will replace the selected text in all of the selected rows.
You can enable and disable column editing mode via the keyboard shortcut ALT-SHIFT-A . Once enabled you can then use either the mouse to select a block of text, or the keyboard using SHIFT (like a normal keyboard select, except the selection will now be in a block).
You can change the mode by hitting the insert key. The mode is also indicated in the lower right of the editor status line.
Block selection is available since Eclipse 3.5. or press Ctrl + 3 ( Cmd + 3 on Mac), type "toggle block" and select Toggle Block Selection command.
Pressing Shift + Alt + A toggles Block or Column selection mode in Eclipse 3.5 or later.
Other than that you can try the 'Columns 4 Eclipse' Plug-in for Eclipse 3.3.1 here.
As another poster noted- the Android ADT blocks the use of Alt+Shift+A. An easy fix is to go to Window->Preferences->General->Keys
and look for "Toggle Block Selection"
From there, you can assign your own hotkey that will not conflict with the Android tools. For example I tied it to Alt+A, which works just fine.
As others have said, this will not work in Eclipse 3.4 or earlier. I am using Eclipse 3.7.2, YMMV.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With