I am trying to improve the usability of the paste functionality in Vim because too many different deletion operations (in fact I do reckon it's all of them) will also yank to the paste buffer.
What this means is that I am no longer able to delete some piece of text I want to paste somewhere, clean something up, and then do my paste. I don't know why this is the order that I prefer to do things, but I'm not about to change it.
I have to basically do the move "atomically" before returning to do clean-up, else I get a frustrating paste of a comma or bracket or space. Oh, I know the reason why I do it in the other order. It's just plain more efficient. I wouldn't have to move to the destination, then return to clean up, then go back again.
How to improve this? My suggestion is a plugin that can be used to augment the paste operation after the fact. hit p
, see that it pasted a useless ephemeral deleted char, and at this point (immediately after a paste operation) our plugin will allow a key to cycle through the previously delete-yanked registers, updating our paste in-place.
This way I can delete things all I want, and I'll actually be able to pull up any recent deleted item quickly, so long as it was a contiguous segment. Which is of course easy to set up with a visual selection followed by a delete. This trades specificity for ease-of-use, as I no longer need to remember to specify some specific named register to use for a particular paste.
In particular, there should be a stack that both yanks and deletes accumulate into, that is later quickly traversed during pasting using a single bind.
Is there a plugin out there that already does this?
p
,"0
is inserted. I wanna hitplugin key
to replace the just-pasted"0
with"1
, etc.