Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse equivalent for Visual Studio ALT + select text over multiple rows

In Visual Studio you can use ALT + your mouse to select a part of a line, over multiple lines. Here is an image to better explain what I mean: enter image description here

And then you can copy it, or replace it all at the same time: enter image description here

Is there an equivalent in Eclipse to do the same? At the moment I'm only looking to select and copy an entire list of around 100 codes in the middle of lines, and paste it somewhere else also in the middle, so I only need to be able to do the first image.

But if the second is also possible in Eclipse I'd love to hear it.


PS: I already know a work-around and have already succeeded in what I want, but would still love to know if this is possible in Eclipse. The workaround I've used:

  1. Copied the entire text containing the codes I want to copy to Notepad++
  2. Copy the entire text where I want to paste it also to Notepad++ in a new tab
  3. Used ALT + Select to copy what I want (Note that you need to already hold ALT before selecting, unlike Visual Studio where you can be busy with selecting and hold ALT to change it.)
  4. Use ALT + select again to paste it in the other file
  5. Copy this modified file from Notepad++ back to Eclipse

^ It works, but isn't very efficient. Not that I use this feature a lot.

(Source for images used)

like image 683
Kevin Cruijssen Avatar asked Feb 28 '26 19:02

Kevin Cruijssen


1 Answers

Eclipse calls it Block Select Mode. This is what the icon looks like:

block select mode icon

You can toggle selection mode by pressing Alt+Shift+A. You get a new (cross hairs) icon and then you can select blocks:

block select in action

Once you have your selection you should be able to type away.

like image 65
Jonah Graham Avatar answered Mar 03 '26 16:03

Jonah Graham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!