Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse multiple text selection like sublime text 2

Tags:

eclipse

is there an option or plugin for eclipse which would enable multiple simultaneous selections in the same editor.

In sublime text, selecting some text and then pressing Ctrl+d will add next instance of the same text to the selection if possible. After selecting the instances needed the editor has multiple carrets (not necessarily on the same or adjacent columns and rows). In this mode it is possible to move all cursors forward or back simultaneously and to edit all instances of text simuntaneously.

I find this feature very usefull and miss it sorely in eclipse..

like image 542
user744959 Avatar asked Sep 25 '12 12:09

user744959


People also ask

How do I select multiple items in eclipse?

Multiple text selection Multiple strategies are available to enable multi-selections: Turn a block selection into a multi-selection using the To multi-selection command, Add a caret with Alt + Click , Use the new Select All button on the Find/Replace dialog.

How do I select the same word in eclipse?

Press ctrl + f for windows computer. Then under FIND, type what you want to find. Then in REPLACE WITH, type in what you want to replace it with.


1 Answers

This Eclipse plugin attempts to provide this feature: https://github.com/caspark/eclipse-multicursor. From the README:

What is this?

A work-in-progress attempt to provide Sublime-Text-like multi cursor support for text editors in the Eclipse IDE.

What works?

  • Multiple identical lines can be edited simultaneously using Eclipse linked mode editing (similar to existing "rename in file" functionality)

Next steps

  • "select next" functionality + associated editing using Eclipse linked mode

  • "find next" + associated editing

  • editing of non-identical text / editing without using linked mode

  • split selection to lines

  • regexp support for find next

like image 81
Trevor Dixon Avatar answered Oct 05 '22 02:10

Trevor Dixon