-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Black hole register in Vim mode #15367
Comments
No workaround for this? I really don't like that behavior 🙄 |
The black hole register was fixed in normal mode in v0.153 (and in visual mode after #18418) |
@ConradIrwin thanks a lot for looking into this. I just tested it out, and while it works if I use the blackhole register manually (e.g., entering
It seems like any mention to the Vim registers in the documentation has been removed as well. Perhaps I'm missing something. Apologies if I am. Thanks again! |
@ConradIrwin I'm also struggling with remapping |
|
Nice! Thanks a lot @ConradIrwin. That is indeed working for me. This is a full set of keybindings adjustments that I would normally use: {
"context": "Editor && vim_mode == normal",
"bindings": {
"ctrl-shift-d": ["vim::PushOperator", "Delete"],
"ctrl-shift-x": "vim::DeleteRight",
"ctrl-shift-c": ["vim::PushOperator", "Change"],
"ctrl-shift-cmd-c": "vim::ChangeToEndOfLine",
"d d": ["workspace::SendKeystrokes", "\" _ ctrl-shift-d d"],
"d e": ["workspace::SendKeystrokes", "\" _ ctrl-shift-d e"],
"d i w": ["workspace::SendKeystrokes", "\" _ ctrl-shift-d i w"],
"x": ["workspace::SendKeystrokes", "\" _ ctrl-shift-x"],
"c l": ["workspace::SendKeystrokes", "\" _ ctrl-shift-c l"],
"c c": ["workspace::SendKeystrokes", "\" _ ctrl-shift-c c"],
"c e": ["workspace::SendKeystrokes", "\" _ ctrl-shift-c e"],
"c i w": ["workspace::SendKeystrokes", "\" _ ctrl-shift-c i w"],
"C": ["workspace::SendKeystrokes", "\" _ ctrl-shift-cmd-c"],
"m m": ["workspace::SendKeystrokes", "\" + ctrl-shift-d d"],
"m e": ["workspace::SendKeystrokes", "\" + ctrl-shift-d e"],
"m i w": ["workspace::SendKeystrokes", "\" + ctrl-shift-d i w"]
}
},
{
"context": "Editor && vim_mode == visual",
"bindings": {
"ctrl-shift-d": "vim::VisualDelete",
"ctrl-shift-x": "vim::VisualDelete",
"ctrl-shift-c": "vim::Substitute",
"d": ["workspace::SendKeystrokes", "\" _ ctrl-shift-d"],
"x": ["workspace::SendKeystrokes", "\" _ ctrl-shift-x"],
"c": ["workspace::SendKeystrokes", "\" _ ctrl-shift-c"],
"m": ["workspace::SendKeystrokes", "\" + ctrl-shift-d"]
}
}, |
Check for existing issues
Describe the feature
To my knowledge, Zed's Vim mode already has some registers implementation (namely
+
and*
).It would be great if the "black hole" register
_
is also added, so I can define a mapping ford
in which it performs the delete operation without saving it to any register. For example, I would like to define these keymaps:Similarly, when I paste on a selection (visual mode), I don't want to loose the previous yanked text:
Thanks in advance!
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: