-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Make goto End of Line / Beginning of Line Select Text #1630
Comments
Has been discussed somewhere before but I can't find the thread. Same problem as #1570 (comment), it's more usable this way but it's inconsistent with the rest of the goto mappings ( |
Even if it's inconsistent, it's not surprising. I would not expect a goto definition keybind to extend from the current cursor position to the definiton because it doesn't make much sense, but I would certainly expect a movement key such as goto end of line to select since helix is a selection first editor. |
Agreed, some keys are obvious to the user to be non-selecting. Additionally, as a user, I would expect common operations like goto EOL/beginning of line to be selecting. |
I think this would be nice as a default, I thought I sent a pull request for this but I didn't, but I did send one for word motion I think. Every motion that user used (
At least personally when I used helix I did tried like |
There is already a difference between EDIT: By the way, you can already get the proposed behavior today with this remap: [keys.normal]
g = { l = ["select_mode", "goto_line_end", "normal_mode"] } |
So why not preserve any Regardless I think it would be nice to have semantic value imparted onto the verbs, right now |
Emacs keys are not desireable in normal mode, only in insert mode they are valueable. |
Even there I think it was a mistake to add so many. |
I don't remember where I read this, otherwise I'd link it, but I figure it's worth noting that |
I think they are very common cases, can we use new keys to do this? Like 'H', 'alt-h' or 'alt-I' to extend_to_line_start, ''L', 'alt-l' or 'alt-A' to extend_to_line_end. |
I was just experimenting and not only does this not do what you'd probably want for this case if the line is empty (since the cursor will already be on the newline, so selecting till next newline will be the end of the following line), but I think this also doesn't work properly (bug?) in the case of a line with a single character (plus newline). If you're on that one character (whitespace or not) and do |
That's a good point, though I think it is the intentional behaviour of |
You are correct. I'd reported it as an apparent bug in #4065 but after clarification I agree it's working as intended and is self-consistent (if a little hard to wrap one's brain around, for some of us ;-) ). |
This doesn't always work as you'd expect, for the same reasons that Similarly, As noted in #1630 (comment), For now, I think these bindings have more consistent behavior with other movement commands, but I'd also expect this to be default behavior:
|
Currently, almost all movement keys move the caret and select text. The behavior of goto differs from this.
Common operations like goto the end of line/ beginning of line should select text.
Having to enter visual mode first is both inconvenient and inconsistent with the behavior of all other movements.
What The Change Will Look Like
Before
Change to the end of the line: v+g+l+c
Delete to the end of the line: v+g+l+c
After
Change to the end of the line: g+l+c
Delete to the end of the line: g+l+c
The text was updated successfully, but these errors were encountered: