grosser / ruco

Desktop-style, Intuitive, Commandline Editor in Ruby. "Better than nano, simpler than vim."
MIT License
130 stars 10 forks source link

Multiple Selection Support #6

Open ajpalkovic opened 13 years ago

ajpalkovic commented 13 years ago

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?

grosser commented 13 years ago

I think thats a rather advanced/complicated to implement feature, that is seldom needed(but nice to have...). I think a goodt way would be to have a shortcut switch into 'box select' mode, after this normal select keys like shift+left/right open a selection box.

I usually take Rubymine as my guide in usability questions, I dont want to reinvent the how-to/feel of a feature, just make it intuitive and simple to implement if possible.

In my experience, having such features like box selection which have to be considered most times a new feature is added often slow down development of new features, so I am not a huge fan.

There are a lot of todo-s open that are rather simple and would benefit most users, so focusing there is time well spent imo.

ajpalkovic commented 13 years ago

Hmm, ok, I'll let it go for now. Every time I brag about multiple selections to people they have the same reaction, they can't see how it is useful. And then they start to use it and fall in love :).

I love having multiple selection support. At some point I will implement it, I'm fine if it doesn't get merged, but that's half the reason I started working on this, because it's far easier to jump into working on this editor that is new and in ruby than say something like nano/emacs.

-AJ

On Mon, May 16, 2011 at 4:58 PM, grosser < reply@reply.github.com>wrote:

I think thats a rather advanced/complicated to implement feature, that is seldom needed(but nice to have...). I think a goodt way would be to have a shortcut switch into 'box select' mode, after this normal select keys like shift+left/right open a selection box.

I usually take Rubymine as my guide in usability questions, I dont want to reinvent the how-to/feel of a feature, just make it intuitive and simple to implement if possible.

In my experience, having such features like box selection which have to be considered most times a new feature is added often slow down development of new features, so I am not a huge fan.

There are a lot of todo-s open that are rather simple and would benefit most users, so focusing there is time well spent imo.

Reply to this email directly or view it on GitHub: https://github.com/grosser/ruco/issues/6#comment_1182577