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
46.58k stars 2.64k forks source link

Selection-first modal editing (like Kakoune, Helix editors - alternative to "vim mode") #4888

Open r-moore opened 1 year ago

r-moore commented 1 year ago

Check for existing issues

Describe the feature

In VIM's command mode you usually type the action before the selection, e.g. dw to delete a word. In selection-first editors like Helix you make the selection before the action, so it would be wd instead of dw.

Having used Helix for a while I now much prefer the Helix/Kakoune convention!

Maybe Zed could implement this customisable way such that you can configure the keybindings to emulate other modal editors?

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

No response

fdionisi commented 1 year ago

Hey, @r-moore @jfaz1 - quick note. I just remembered there is an open discussion regarding "Post-vim" modal editing. You may draw inspiration or give suggestions there too. 😁

xulis commented 1 year ago

Agreed, I think the helix way is better than vim.

hovsater commented 1 year ago

This feature is one of the few things blocking me from using it as my daily driver. I don't think adding a customizable way to create your own keybinds is really necessary; if you add helix and vim (already in), and maybe emacs, that satisfies the vast majority of use cases without overcomplicating it.

The editing models used by Vim, Helix and Emacs are all vastly different and implementing just one of these modes in Zed would require a monumental effort. I don't think it makes much sense for this to live within core Zed, but rather as community extensions.

uxiew commented 1 year ago

yeah,Allowing users to do this through plugins, regardless of whether they prefer vim or helix, is the best way.

r-moore commented 11 months ago

Sounds like it won't be a core feature and will need someone to write a plugin. Hopefully the API will be flexible enough to allow for this :)

Should I close this issue then folks?

JosephTLyons commented 10 months ago

I'd leave it open. Nothing is off the table in terms of what we might add. Also, we have the potential plugin label, which has been used all over the place here, so that devs will know what sort of features zed users want when we have the plugin system. :)