-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I want to add multiple selection support to ruco. It's a neat feature in editors like e and sublime. The idea is I can make more than one text selection in a document, then when I type, it modifies each one of them at the same time.
For shortcuts, I think we would have the normal ones to make a single selection:
shift+<up/down/left/right>
In other editors they ctrl+click to start a new selection, but we can't do that. So I had two thoughts for getting around this. First, we could do something like ctrl+arrows moves the cursor without removing the selections. The other options is we could have a shortcut like ctrl+shift+s that saves a selection so that subsequent arrow key presses do not clear the selections. Then a shortcut like ctrl+shift+r would remove all of the selections. I think I prefer the first option, but I can see that being annoying too, it's not natural and might take getting used to.
Vertical selections can be done with alt+shift+arrows. Basically it lets you create a box selection, and then a selection is created for the select text on each line in the box if that makes sense.
Additionally, things like find would automatically select the text, and findAll would select every match.
I'm not sure how it should work with cut/copy/paste. Should you be allowed to cut text from multiple selections? I think pasting should paste the clipboard value to each selection, but cutting/copying is harder. I guess for now we can just only allow those operations when there is a single selection?
Thoughts?