zed
zed copied to clipboard
Vim mode: Don't open the command palette for every Ex command
Check for existing issues
- [X] Completed
Describe the feature
This one probably cuts deep in your vision of connecting Vim and Zed, but I'd like to hear your feedback. Opening the command palette on colon is a confusing choice to me for two reasons:
-
the first colon doesn't even really start the Ex command, typing
:wjust works because:writeis the first result matched when typing "w" in the command palette, but it's apparently intentionally sorted that way -
as a former Vim user I often save files, quit them, save-quit etc. and that command palette is often unused and disorienting, imagine that it pops up on every Cmd+S
-
there's already a shortcut that opens the command palette, depending on the keybinding (for example Cmd+Shift+P), let it be the one that people use it explicitly when the actually want to see the palette and reach for something
But I understand that that leaves possibly the hardest question open: where to display Ex commands now?
Is the space in the status bar available for that, like in Vim?
If applicable, add mockups / screenshots to help present your vision of the feature
Alternative resolution
As I imagine this would require a lot of rethinking, because it would be weird for Ex commands to in the status bar, and the search would remain integrated with the Zed search, a middle ground that I would also be satisfiied with is for the command palette to at least open with the colon already typed in, not without one.
Personally,I think commands and searches should be like the original vim.but the team hopes that vim is just an add-on, not to the main function of more functional modifications, can maintain the original interface to maintain the original interface.
Philosophy
Vim mode in Zed is supposed to primarily "do what you expect": it mostly tries to copy vim exactly, but will use Zed-specific functionality when available to make things smoother.
This means Zed will never be 100% vim compatible, but should be 100% vim familiar! We expect that our vim mode already copes with 90% of your workflow
I realize that, and I'm fine with it, that's why I decided to backtrack my suggestion with an alternative resolution, especially when I thought of search, which would have to be moved to the status bar as well (although I wouldn't mind that).
But currently I can save my file by typing in ::w, and this is not Vim familiar, so I think at least that needs to be resolved as an actionable problem that doesn't require rethinking Zed's Vim integration. By at least opening the command palette with a colon other items in there can be less distracting.
@silvenon Sorry for the slow response here.
It should be the case that typing :w<enter> works out of the box to save - you should not need to type two colons. Are you seeing something different?
I went back-and-forth on whether to prefill a : in the command palette; I decided not to because I didn't want users to have to delete it to access zed commands, but it might be less confusing if it was there and we just ignored it.
Perhaps I described it wrong, Vim bindings are working correctly, as you say. And you also explained the background behind not starting with colon, so I get it now.
I still find the command palette itself distracting, which was the main reason behind opening this issue, but because I don't really feel like I have a good alternative suggestion… I guess that's it then.
Feel free to close if you don't have plans to implement this differently.
@silvenon will close for now, but I do know you're not the only one who finds it not great.