Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rectangular select in Eclipse editor as in any Microsoft tools

Tags:

editor

eclipse

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?

like image 705
Ravisha Avatar asked Apr 19 '10 06:04

Ravisha


People also ask

How do I select vertically 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.

How do I select in Eclipse?

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).

How do I get my cursor back to normal in Eclipse?

You can change the mode by hitting the insert key. The mode is also indicated in the lower right of the editor status line.

How do I select a block in Eclipse?

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.


2 Answers

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.

like image 81
Peter McG Avatar answered Nov 09 '22 06:11

Peter McG


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.

like image 27
afalend Avatar answered Nov 09 '22 06:11

afalend