Yankee is a minimal plugin to fix some of the annoyances around yanking and maybe more in the future.
- locking default paste register (so that
pwill keep pasting the same thing, even if you delete/change/yank something else in between).
- easily paste from system clipboard
- keep track of changes and yanks.
- choose text to paste from list of deletes/changes/yanks.
yankee depends on venom. Best way to install is with vim-plug:
Plug 'nielsmadan/venom' | Plug 'nielsmadan/yankee'
yl - Lock the paste register (p will continue to paste the same thing even if you yank other text) yu - Unlock the paste register (p will paste whatever was last yanked again). yt - Toggle lock / unlock paste register.
Yankee works by storing the content of the default register into a named register, and then overwriting p/P commands to paste from there (and undoing the mapping later). By default it will use the named 'o' register for this. This can be overwritten using:
let g:yankee_lock_register = "t"
All yankee commands start with 'y'. If you'd like to use another prefix rather than 'y' you can overwrite this using:
let g:yankee_prefix = "q"
This would then change it to 'q'.