-
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
Repeating indent doesn't select the same portion of text in Vim mode #12351
Comments
This comment was marked as spam.
This comment was marked as spam.
Good workaround for now would be to use |
Edit: Due to lack of sleep, I didn't see #12582 was already open with a proposed solution. Ignore my notes below. Sorry!
I think the problem is that in visual mode, the vim command for Here is the relevant section of the default vim keymap: [
{
"context": "Editor && vim_mode == visual && !VimWaiting && !VimObject",
"bindings": {
">": "vim::Indent",
"<": "vim::Outdent",
}
},
{
"context": "Editor && vim_mode == normal && vim_operator == none && !VimWaiting",
"bindings": {
".": "vim::Repeat",
">": ["vim::PushOperator", "Indent"],
"<": ["vim::PushOperator", "Outdent"],
}
}
] I've tried changing my custom keymaps, but I still encounter the same behavior. [
{
"context": "Editor && vim_mode == normal && vim_operator == none && !VimWaiting",
"bindings": {
".": "vim::Repeat",
">": ["Indent"],
"<": ["Outdent"]
}
}
] |
Please let us know if the attached PR has resolved the issue for you. |
@Moshyfawn Would that require building Zed from source? I tried the latest preview now (0.139.3), but the behavior of repeating |
Yeah, the commit 2f05778 is not in a release yet. Will go into next Preview release on Wednesday. Stable the week after. |
The feature is now in today's preview (0.140-pre). I'm going to optimistically close this out, but feel free to ping us to reopen if something isn't correct. |
…stries#12582) Release Notes: - vim: Fix indent via `<` and `>` not being repeatable with `.`. [zed-industries#12351](zed-industries#12351)
Check for existing issues
Describe the bug / provide steps to reproduce it
In Vim, when I select a portion of text in visual line mode and press
<
/>
, I then often use "." to repeat the indent/outdent on the same text multiple times. E.g. in Ruby if I want to outdent by 4 spaces, I would press<
(2 spaces) and then.
once (2 more spaces).In Zed, this doesn't appear to work correctly. When I hit
.
after<
/>
, it indents/outdents a different part of text than what I initially selected.I would be fine with indenting with
Tab
and outdentingShift-Tab
, but those don't appear to work in Vim's virtual line mode. It would be nice if it did 🙂Environment
Zed: v0.136.2 (Zed)
OS: macOS 14.4.1
Memory: 8 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Here I pressed
<
and then...
.Screen.Recording.2024-05-27.at.14.30.24.mov
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response
The text was updated successfully, but these errors were encountered: