eclipse 是否有一个选项或插件可以在同一编辑器中同时进行多个选择。
在 Sublime Text 中,选择一些文本,然后按 Ctrl+d 会将相同文本的下一个实例添加到选择中(如果可能)。选择所需的实例后,编辑器有多个插入符号(不一定位于相同或相邻的列和行上)。在此模式下,可以同时向前或向后移动所有光标,并同时编辑所有文本实例。
我发现这个功能非常有用,并且在 Eclipse 中非常怀念它..
最佳答案
此 Eclipse 插件尝试提供此功能:https://github.com/caspark/eclipse-multicursor 。来自自述文件:
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
关于Eclipse 多文本选择,如 Sublime Text 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12583201/