-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 emacs keybindings for mark emulation #22904
base: main
Are you sure you want to change the base?
Conversation
These keybindings extend the already selected text. This allows closer emacs emulation where subsequent movement commands extend / shrink the current selection instead of dismissing it.
e8e46f1
to
4e6c580
Compare
I've updated this PR to
|
I love this. Particularly the elegance of "mark mode" being activate whenever there is a I've added Currently |
I've tried to test this in various
In a buffer I think these behaviors are fine but I think in the single line editors (search, modals, etC) I think this behavior is a little too jank to ship. How would you feel about changing the keybind contexts to:
Would it be an acceptable compromise to add support for emacs style "mark mode" but only in Full Editor buffers, not in line editors? I also noticed a difference between this an emacs behavior:
Alternatively we could conceivably split the arrow/home/end binds I added to only be used in Thoughts? |
Thank you!
This is great, thanks for adding these.
Alt-/ would be a natural keybinding for this as it is used in Emacs for various text completion mechanisms (by default
You're right, in Emacs selecting text with Shift + arrow keys does not set the mark. But I can't think of a way to replicate this behavior. For users who use Emacs keymap but prefer selecting text with classic Shift + arrow keys this could be a regression and a bit annoying.
I think this is a good compromise. These keybindings are most valuable in file and assistant buffers, and we can omit line editors to keep this PR simple and not introduce counter-intuitive edge cases. I will update the |
These keybindings extend the already selected text. This allows closer emacs emulation where subsequent movement commands extend / shrink the current selection instead of dismissing it.
This is a follow up on
Release Notes: