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

clip-history extension support #4005

Open
Spirarel opened this issue Aug 28, 2019 · 4 comments · May be fixed by #8803
Open

clip-history extension support #4005

Spirarel opened this issue Aug 28, 2019 · 4 comments · May be fixed by #8803

Comments

@Spirarel
Copy link

What is Clip-history?

Clip-history (also know as a yank-ring or kill-ring) is a feature that creates a small buffer of recently yanked, or copied, text. The buffer is then accessed with repeated presses of paste (or cmd+v), which cycle through the ring in a last-in, first-out manner, looping back to the first instance after viewing all entries in the buffer.

What does this solve?

Remembering and accessing paste buffers is a common pain-point in the vanilla vim experience. It has been addressed in vim with yank-ring, and in Atom's Vim-mode-plus with the excellent clip-history.

A relatable experience to many is needed to replace text within parenthesis with text previously outside. In vanilla vim yanking the desired text, then deleting the inner parenthesis text will replace the desired text in the default buffer. Ex:

function(props) {
    const ret = props.toggle ? 'why allocate' : 'here?'
    return(ret)
}

D on "props.tog...", followed by cib on "ret" will mean you have to specify the paste buffer, rather than just cycle through quickly with two presses of p.

Comments

While the above is a MWE, it's not uncommon to need to paste something a few deletions/changes back. Cycling through paste is highly visual and quick, offer more feedback than pasting from buffers. It's a great feature and I hope you guys think it's worthy of inclusion!

@Liu233w
Copy link

Liu233w commented Sep 6, 2021

Hi devs, I just found an extension with similar functionality: https://github.com/SrTobi/code-clip-ring/ . Are there any ways to integrate it into VSCodeVim?

@HyunggyuJang
Copy link

You can use my fork as a drop down support for kill ring support: https://marketplace.visualstudio.com/items?itemName=HyunggyuJang.vim-with-killring

@nomoid
Copy link

nomoid commented Jan 1, 2024

@HyunggyuJang I tried your fork out and it works great - any chance you could upstream it? (Since I'd like to have it on my other installations as well). Thanks!

@HyunggyuJang HyunggyuJang linked a pull request Jan 1, 2024 that will close this issue
@HyunggyuJang
Copy link

@nomoid Thanks for having an interest. I made a PR for this, see #8803

HenryTSZ added a commit to HenryTSZ/NVim that referenced this issue Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants