I'm having a bit of trouble recently where I'll select a bit of text, yank it, move somewhere new, and then press p
to paste, and the entire function is pasted in instead
has anyone experienced anything like that before?
it happens rarely enough that i can't pinpoint which plug-in is causing it
maybe Plug 'machakann/vim-highlightedyank'
and :registers
can help debug?
you can use :registers
to confirm what was yanked
but it sounds like it's an intermittent thing
interesting, i'll try that, thanks
While we're on the subject of being sure what you yanked, I just stumbled upon this plugin today and installed it, and it's great. It solves a problem I didn't know that I had 😄 https://github.com/machakann/vim-highlightedyank
thanks for telling me about :registers
, y'all
it's also great when you yanked or cut something a few edits back and want to use it again without undo
yeah, registers are great when you plan ahead, though (aside from the + register) i rarely use them anymore since i started using yankring
looks like something is inserting the whole function def into the *
register, think it has to do with coc.nvim
, but i don't have the time to dig into that, so i'll just use the "
register to stay safe
the key thing is that previous yanks show up in the registers automatically, though using the paste / undo cycle browses them as well
you don't need to plan ahead for them any more than you do when using the yank ring
oh nice. i was thinking of naming registers (`"a`, etc)
right that shows up in the output of :registers
too