gbprod/yanky.nvim

Manipulating/Cycling yank history before putting

Closed this issue ยท 4 comments

I would like to be able to cycle and drop entries from the yank history before putting. For example I might yank something to paste, and then get distracted and accidentally delete/yank something else. If i realise this before pasting then I could drop the latest entry in the yank history before pasting. I think this is related to the requests to have yanky remember the ring position (#76), which would also solve this problem but somewhat out of order. Adjusting the yank history before pasting would work better with macros

gbprod commented

I've you tried to use pickers ? Telescope extension allows to remove entries from the yank ring and choose the entry to paste.
Another way is to use in lua : :lua require("yanky").histoy.delete(1) to remove lhe last entry in the yank ring

I knew the pickers worked but I somehow missed the delete function while reading

Oh actually I don't think require"yanky".history API is documented anywhere?

gbprod commented

Yes because it was initially made for internal use ๐Ÿ˜