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: Support `=` and `!` #12565

Open ethanmsl opened 4 weeks ago

ethanmsl commented 4 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I was just perusing the vim cheat sheet linked in the Zed docs, directly after mentioning that zed vim is tested against Neovim.

Playing with some operators I noticed that many of them do not always work in Zed, but do work in Neovim.

In particular

The non-action is the same for all the above listed.

Some of them do work in Visual mode, but not in Normal mode.

Environment

Zed: v0.137.6 (Zed) OS: macOS 14.5.0 Memory: 96 GiB Architecture: aarch64

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

examples:

Neovim

see the |readme ~~ gUw~~> see the README| |let Some(thing) ~~ >w ~~> | let Some(thing)

Zed

see the |readme ~~ gUw~~> see the readme| |let Some(thing) ~~ >w ~~> let |Some(thing)

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

ConradIrwin commented 3 weeks ago

@ethanmsl Thanks for reporting!

If you'd like to pair with me on implementing any of these, feel free to book time here: https://calendly.com/conradirwin/pairing.

Most of these are supported by the editor, but need a bit of wrapping to make them work vimilly (supporting motions, counts, and repeats, etc.) so I don't think it's too hard, but it does need doing.

I'm not sure what to do about ! yet, we do now have the infrastructure in place to spawn tasks, but I don't think we have anything else that reads the output back again, though I guess we can do that with some redirections.

ethanmsl commented 3 weeks ago

I'd love to.
I placed a spot on your calendar Friday late morning (Jun 7th (F), 10am PST).
Feel free to punt it to next week or request a last minute reschedule. (I'll put it down as 'hack on something' time on my calendar, so nbd to change focus.)

ConradIrwin commented 3 weeks ago

Updated issue to be clear about the current state of things!

Thanks for pairing on guU~ today, and I look forward to seeing what you come up with on !.