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

easymotion vim #4930

Open jjhiggz opened 1 year ago

jjhiggz commented 1 year ago

Check for existing issues

Describe the feature

In VSCode's vim emulation you have an easymotion mode that allows you to type in

<leader><leader>motion

Then instead of doing that motion regularly, it will pull up easymotion which works like this

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

https://www.loom.com/share/65f7ff4745df4f85bc1cd3ca51afdf83

EdAyers commented 1 year ago

keen for this outside of vim mode too

clo4 commented 1 year ago

Related: zed-industries/zed#5289

akasuv commented 2 months ago

A must need!

baldwindavid commented 2 months ago

Related: Helix editor just added something similar based upon Amp's "jump mode" in https://github.com/helix-editor/helix/pull/8875. I tend to agree with the reasoning behind this implementation...

While testing that PR we made the following observations:

  • character based jumps (which require a character before tying a label) don't really hold their water, you can use f for simple cases and / (which we want to improve further) for complex cases. Compared to a jumpmode these commands work with multicursors.
  • word base jumps can be useful for quickly repositioning the primary cursor.
  • a simple implementation like in AMP without dimming, color changes and complex letter assignment based on distance, ... was not only a lot simpler to implement but also more predictable/less disruptive
lucasvfventura commented 2 months ago

Please consider the vim leap, other seem to mention it as well, https://github.com/zed-industries/zed/issues/4934#issuecomment-2059780379

akasuv commented 2 months ago

hop.nvim is another good reference.

Aur0nd commented 1 month ago

Personally if I see this one implemented I'm making the tool my main editor

alex35mil commented 1 month ago

I tried all the popular jump plugins and settled on pounce.nvim.

In contrast with label-based options, it allows to type a target word and do the jump. I find it more natural as I don't need to read into random chars but immediately start typing as I already know the word.