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
39.13k stars 2.03k forks source link

[vim] single line input vim mode #13293

Open 0x2CA opened 1 week ago

0x2CA commented 1 week ago

Check for existing issues

Describe the feature

As far as I know, there is a single line vim mode at the beginning, but due to the esc problem, it causes the need to press esc multiple times. So single line vim mode is turned off, and I was wondering if it is possible to add shift-esc instead of the original esc so that multiple esc presses can be avoided. problem, or the default behavior is to go back, but use shift-esc to enter normal mode?

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 1 week ago

Forgive me for not being a vim user. I don't quite understand exactly what you're asking for. Can you explain to me like I'm five?

I wonder whether this could be solved with a custom keybinding for shift-esc.

0x2CA commented 1 week ago

The core of this issue is that any single line of input should support vim mode, this includes search input, chat input rename input etc. This is a feature that can not be achieved with a simple keymap, nowadays cursor movement deletion is limited to the most primitive keybindings, this is far from vim, it was possible in the early versions supported by zed, but some people opened the issue complaining about why you need to press esc multiple times to close the interface, because the first press is switching from insertion mode to normal mode, and the second time is the actual The second press was to actually close the interface. Then the team turned off this feature. But this feature is very common in lazyvim which also supports it.

0x2CA commented 1 week ago

For example telescope.nvim

https://github.com/zed-industries/zed/assets/19868292/f1600e3f-ac8a-4d51-895a-8cd10948a716