zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.25k stars 2.73k forks source link

Vim: Repeating indent/outdent doesn't work and makes Zed unresponsive #14094

Closed silvenon closed 2 months ago

silvenon commented 2 months ago

Check for existing issues

If #12582 hasn't yet been released, I apologize, and you can close this.

Describe the bug / provide steps to reproduce it

On macOS:

For me nothing happened, and my Zed becomes unresponsive for about 20 seconds.

Environment

Zed: v0.143.6 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

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.

Zed.log


JosephTLyons commented 2 months ago

cc @ConradIrwin

ConradIrwin commented 2 months ago

@silvenon I can reproduce that in visual block mode . does not work for > (when you select from top to bottom) because we don't restore the cursor position correctly in that case.

I am surprised that it's crashing zed for you. Do you have any custom keybindings or settings that might interfere?

silvenon commented 2 months ago

Erm, I can't reproduce the bug anymore, indenting and outdenting is repeatable for me now 😮 Maybe something happened during upgrading Zed that broke that functionality for me previously, and now that I restarted it it works…? But you're not able to repeat it, so I don't know what's going on 😕

Still, here are my settings and keymap in case it helps:

settings.json ```jsonc { "base_keymap": "VSCode", "vim_mode": true, "preview_tabs": { "enable_preview_from_code_navigation": true }, "cursor_blink": false, "terminal": { "blinking": "off" }, "tab_size": 2, "tab_bar": { "show_nav_history_buttons": false }, "theme": { "mode": "system", "light": "Atelier Cave Light", "dark": "Ayu Dark" }, "file_types": { "HTML": ["html", "svg"], "JSON": ["json", "jsonc"], "Shell Script": ["sh", ".env*"] }, "git": { "inline_blame": { "enabled": false } }, // https://github.com/biomejs/biome-zed/issues/15#issuecomment-2115655791 "language_servers": ["!biome", "..."], "languages": { "JavaScript": { "code_actions_on_format": { "source.fixAll.eslint": true } }, "TypeScript": { "code_actions_on_format": { "source.fixAll.eslint": true } }, "TSX": { "code_actions_on_format": { "source.fixAll.eslint": true } } } } ```
keymap.json ```jsonc [ { "context": "Terminal", "bindings": { "cmd-t": "workspace::NewTerminal" } }, { "context": "ProjectPanel", "bindings": { "cmd-backspace": ["project_panel::Trash", { "skip_prompt": true }] } } ] ```

https://github.com/user-attachments/assets/25482b65-b94e-4471-a19e-1f5b682d2201

ConradIrwin commented 2 months ago

Ok, will close for now, let me know if you can reproduce!