Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

feature: shift-select #23

Closed
grandinj opened this Issue Jun 4, 2012 · 11 comments

Comments

Projects
None yet
3 participants

grandinj commented Jun 4, 2012

Awesome editor!

It would be great if it supported shift-selection i.e. selecting text by holding down the SHIFT key and then using the cursor keys.

Thanks.,

Owner

Pistos commented Jun 4, 2012

Thanks for the compliment.

Unfortunately, shift-arrow is often captured by the terminal window. It is also indistinguishable from normal arrow keys (without shift) in the TTY terminals. This is one of the first things I tried to do in early Diakonos development, though.

Thanks for your feedback.

@Pistos Pistos closed this Jun 4, 2012

grandinj commented Jun 4, 2012

If I load the map specified here:
http://oss.sgi.com/LDP/HOWTO/Config-HOWTO/x43.html

Will diakonos recognise the command sequences?

Owner

Pistos commented Jun 4, 2012

It might, but in order to use shift-arrow for selection, the selection feature would have to be changed accordingly. That's non-trivial.

Contributor

dominikh commented Jun 5, 2012

shift+arrows actually is very distinguishable in terminals, at least in the ones I tested (rxvt, screen, xterm).

Owner

Pistos commented Jun 5, 2012

While that may be true, I wouldn't want to get degrade or confuse my muscle memory as to which keys to press for selection. :) More importantly, anyway, there needs to be new code for handling starting and stopping selection with such keystrokes.

I would really like this feature - every other editor I use supports it.
Would you object to a patch to implement it, and if so, where in the code should I start looking?
Thanks.

Owner

Pistos commented Jun 14, 2012

@grandinj : I would not object to a cleanly-written pull request for this feature. This is a core function of the editor, though, so it has to be written with care. It should be a configuration setting, too, to choose between the classic selection method and this new one.

Begin by writing new tests in spec/functions/selection.rb. Then add new key-assignable functions in lib/diakonos/functions/selection.rb and modify lib/diakonos/buffer/selection.rb to do the bulk of the work.

@Pistos Pistos reopened this Jan 2, 2014

Owner

Pistos commented Jan 11, 2014

Those of you interested in this alternative selection method: Please try the shift-select branch. Ensure your system/installation config is updated with the one from this branch, as it contains key definitions that are necessary for the new feature to work.

Owner

Pistos commented Jan 11, 2014

Oops, there's a bug when you try to shift-select and scroll down past the page edge.

Owner

Pistos commented Jan 11, 2014

Fixed.

Owner

Pistos commented Jan 13, 2014

This is now in the master branch, and will be present in the release of version 0.9.2.

@Pistos Pistos closed this Jan 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment