-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(term): uniformize word-wise movement and deletion #2500
Conversation
Similarly for insert mode there was #2193 Should we remove the old |
bacd99d
to
a89b147
Compare
I think Alt Backspace vs Ctrl Backspace is a similar story. (I prefer the latter one) |
Feel free to open a PR with those changes too 👍🏻 |
Yeah I agree, let's remove the ctrl bindings. |
Just to be sure, did you mean "alt bindings"? |
Ah yeah sorry 😅 |
9482527
to
503525e
Compare
I updated the PR and rebased on master. Should be ready I think. Looks good to you @pickfire ? |
Ctrl-based shortcuts are common in numerous applications. This change: - Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, … - Removes Alt-Left and Alt-Right in prompt, picker, … - Adds Alt-Delete in insert mode for forward word deletion In some terminals, Alt-Backspace might not work because it is ambigous. See: helix-editor#2193 (comment) Hence, Alt alternative is not removed.
503525e
to
303f1f5
Compare
ctrl!('w') | alt!(Backspace) | ctrl!(Backspace) => self.delete_word_backwards(cx), | ||
alt!('d') | alt!(Delete) | ctrl!(Delete) => self.delete_word_forwards(cx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this alt behavior is not needed since we have ctrl, but yeah I am fine with this for now given that alt does not have good use yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
…2500) Ctrl-based shortcuts are common in numerous applications. This change: - Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, … - Removes Alt-Left and Alt-Right in prompt, picker, … - Adds Alt-Delete in insert mode for forward word deletion In some terminals, Alt-Backspace might not work because it is ambigous. See: helix-editor#2193 (comment) Hence, Alt alternative is not removed.
Ctrl-Left and Ctrl-Right are common shortcuts in numerous applications.
This change is just adding a new key binding for the existing word-wise movement:
EDIT: after reviews, changed to the following:
In some terminals, Alt-Backspace might not work because it is ambigous.
See: #2193 (comment)
Hence, Alt alternative is not removed.