Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for replace with register in vim mode #22760

Closed
1 task done
thomasheartman opened this issue Jan 7, 2025 · 4 comments
Closed
1 task done

Support for replace with register in vim mode #22760

thomasheartman opened this issue Jan 7, 2025 · 4 comments
Labels
enhancement [core label] vim

Comments

@thomasheartman
Copy link

Check for existing issues

  • Completed

Describe the feature

I'd love to see support for the vim script ReplaceWithRegister (github mirror, vim.org) .

According to the readme:

Replacing an existing text with the contents of a register is a very common
task during editing. One typically first deletes the existing text via the
d, D or dd commands, then pastes the register with p or P. Most of
the time, the unnamed register is involved, with the following pitfall: If you
forget to delete into the black-hole register ("_), the replacement text is
overwritten!

This plugin offers a two-in-one command that replaces text covered by a
{motion}, entire line(s) or the current selection with the contents of a
register; the old text is deleted into the black-hole register, i.e. it's
gone. (But of course, the command can be easily undone.)

I first encounterede this as a VSCode plugin and quickly became very used to having it ready. It replaced my previous workflow of making a visual selection and then pasting with the added bonus that it didn't overwrite the copy register.

Zed Version and System Specs

Zed: v0.167.1 (Zed)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64

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

No response

@thomasheartman thomasheartman added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jan 7, 2025
@JosephTLyons JosephTLyons added vim and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jan 8, 2025
@ConradIrwin
Copy link
Member

Thanks for the idea! If you'd like to pair with me on this: https://calendly.com/conradirwin/pairing

@ConradIrwin
Copy link
Member

(Also Duplicate of #18813)

@thomasheartman
Copy link
Author

Oh, my bad. I'm sure I looked for this, but must've missed that there was already an issue for it. Thanks for sorting them out and for hearing me out 🙌🏼

As for the pairing: that sounds tempting, but timewise it might be a little difficult. How long do the sessions usually go for? 30 min?

@ConradIrwin
Copy link
Member

If you can do 30m, let’s do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] vim
Projects
None yet
Development

No branches or pull requests

3 participants