eclipse multiple text selection like sublime text 2

后端 未结 7 1803
面向向阳花
面向向阳花 2020-12-24 11:04

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 pressi

相关标签:
7条回答
  • 2020-12-24 11:27

    Alt + Shift + A, then you can hold shift and use the cursor in multiple lines.

    0 讨论(0)
  • 2020-12-24 11:29

    ALT + SHIFT + F worked for me.

    enter image description here

    0 讨论(0)
  • 2020-12-24 11:31

    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

    0 讨论(0)
  • 2020-12-24 11:37

    This feature is available in LiClipse.

    See it in action (more towards the end of the video).

    It supports linking with Ctrl+K, unlink with Shift+Alt+K, Ctrl+Alt+mouse double click to select words or Ctrl+Alt+Mouse to make a selection of a region (or just end lines).

    0 讨论(0)
  • 2020-12-24 11:39

    You can see shortcuts for all here:

    Goto -> Window -> Preferences -> General -> Keys and search for replace then you will see binding for Find and replace. In the bottom of that window, you can add your key to Binding text box. There you can add or edit any keys as shortcut.

    If you want to replace selected word's matching words or find selected words, use below keys because you do not need to select all words in eclipse:

    Ctrl+F gives me Find/Replace dialog box.

    Or you can,

    First Alt+A

    Next Alt+F

    Then press on Replace or Search button occurding to your need.

    0 讨论(0)
  • 2020-12-24 11:45

    Like Ctrl+D I could not find, but like Alt+F3 in sublime (multiselects all matches), you can do by pressing Alt+Shift+R, or select text > right click > refactor > rename.

    Must say that this does not work with any kind of text. It works with names of variables, functions, classes etc.

    Tested on Eclipse 3.8.1

    0 讨论(0)
提交回复
热议问题