Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add normal commands to extend selections downwards/upwards. #4929

Closed

Conversation

arrufat
Copy link
Contributor

@arrufat arrufat commented Jun 20, 2023

Since we changed the x keys behaviors, the X and <a-X> have been free.

I think it makes sense to make them work mostly like / and other commands, where shift extends the selection and alt changes the direction.

So, the implemented behavior is:
<X> : select the current and next line (extend downwards)
<a-X> : select the current and previous line (extend upwards)

Overall, I think it's a good change that's consistent with the way other keys (and modifiers) behave in Kakoune.

Note: in this implementation, pressing once <X> or <a-X> will result in two lines being selected (regardless of the current line being completely selected). This makes the keys more predictable, but it might be surprising at the beginning, if someone expects the old X behavior.

@arrufat arrufat force-pushed the add-expand-lines-upwards-downwards branch 2 times, most recently from d5a73fe to d9bd153 Compare June 20, 2023 05:29
Since we dropped the we changed the `x` keys behaviors, the `X` and `<a-X>` have been free.

I think it makes sense to make them work mostly like the `/` command, where shift extends the selection and alt changes the direction.

So the implemented behavior is be:
<X>   : select the current and next line (extend downwards)
<a-X> : select the current and previous line (extend upwards)
@arrufat arrufat force-pushed the add-expand-lines-upwards-downwards branch from d9bd153 to b11e895 Compare June 29, 2023 06:14
@mawww
Copy link
Owner

mawww commented Jul 3, 2023

I am not too keen on that change, free keys are very scarce and kakoune normal mode is already quite complex, I am not convinced adding a slightly different way of doing Jx and Kx is worth it.

@arrufat
Copy link
Contributor Author

arrufat commented Jul 3, 2023

Ok, got it. Just wanted to make sure this was considered. Thank you :)

@arrufat arrufat closed this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants