clip-history extension support
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!
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?
You can use my fork as a drop down support for kill ring support: https://marketplace.visualstudio.com/items?itemName=HyunggyuJang.vim-with-killring
@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!
@nomoid Thanks for having an interest. I made a PR for this, see #8803