Open liona24 opened 1 month ago
Can you describe further what happens when vim mode stops working? What's broken / what are you trying to do, but can't, etc. Is there anything which proceeds the failure?
Next time could you also try toggling off/on vim mode (cmd+shift+p, toggle vim mode). I don't expect it necessarily help, but worth a shot.
Usually I am stuck in insert mode (or vim is completely disabled I cannot tell the difference?), i.e. cannot switch back to normal mode, but the usual key input seems to work fine, meaning I can type and navigate via arrow keys. Sometimes I am stuck in normal mode and then no keys are accepted, i.e. no navigation via hjkl
, cannot enter insert mode etc.
I tried issuing commands via cmd+shift+p
as suggested. I did not find toggle vim mode
so I am assuming I am still in vim mode. I could manually switch modes with that, f.e. issue vim: insert after
which would get me out of normal mode in a stuck instance. This also recovered the instance pretty decently it seems. It however immediately killed the "working state" in the other instance.
toggle vim mode
should always be there (whether you are in vim or normal non-modal editing mode).
If you determine any common patterns in the actions or editor content that results in the funky VIM state please share, but I'm glad there's a partial workaround (triggering a vim mode change via command palette) in the meantime.
Found the toggle action now. It will disable vim in all open instances. Toggling it again will enable it in the currently focused instance and will cause the "bad" mode of operation in the other instance.
Currently this triggers every time. I do this:
mkdir /tmp/foo
touch /tmp/foo/foo.txt
mkdir /tmp/bar
touch /tmp/bar/bar.txt
zed /tmp/bar
zed -n /tmp/foo
Then opening the files foo.txt
and bar.txt
surely causes one of them to not work.
Can you reproduce this by any chance?
I cannot really see anything that would be helpful in the logs, can I add verbosity somehow?
It sounds like focus events are not firing correctly between multiple windows.
Currently vim mode maintains an idea of which editor is active, and relies on window focus to switch between them.
I have the same issue on linux; env:
Check for existing issues
Describe the bug / provide steps to reproduce it
I usually open multiple instances of zed for different workspace folders. I open following instances from terminal using
zed -n path/to/dir
. I have vim mode enabled in the existing instance. Now either of two things happen (usually): 1) Vim mode stops working in the existing instance 2) Vim mode is not enabled / is not working in the new instanceSometimes it works, but if I keep opening I will see this happening eventually. Additionally, it is not consistent as well. If I switch the zed windows, sometimes it starts working again in one instance, but starts to fail in the other, or it stops working in both, etc.
I am not sure what to look for in the logs, there seems to be nothing related to
key
,vi
Environment
Zed: v0.143.7 (Zed) OS: Linux Wayland fedora 40 Memory: 30.9 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
No response