Closed ZacharyRizer closed 2 years ago
Hi @ZacharyRizer! neoclip
only listens to the TextYankPost
event for things that are yanked, it doesn't read directly from the registers and specifically doesn't check if eg "+
changed if you copied something outside neovim. So at least at the moment I think neoclip
doesn't do what you were hoping, unless I might have misunderstood what you were trying to do.
@AckslD no you understood perfectly and thank you for the response. If it is possible down the line to have things that were copied outside of Neovim (to the + and * registers) shown in the :Telescope neoclip buffer that woudl be amazing.
@ZacharyRizer That would probably be nice indeed but I think this would maybe require some change to core neovim to for example have events triggered for these things. Cause I would like to avoid having something in neoclip
continuously checking for changes and rather have it react to something.
@AckslD thanks again for the response. I am not sure how vim-yankstack functions, but in that plugin the external clipboard is part of the yanks available to paste inside of neovim. You can see in this screen shot - the first is what I yanked from my browser, and the second two are from within neovim. Not sure how they implement it, but could be useful. Thanks again
.
Interesting, thanks for sharing @ZacharyRizer
@ZacharyRizer Does it actually store a history of what was yanked outside neovim? What happens if you copy two different things outside neovim, do you only see the last. Looking at the source code it looks like it only looks up what's currently in eg "+
.
@AckslD - It only takes the most recent yank outside neovim. So if you copy two things it will only show the most recent outside neovim. It also looks like it replaces the most recent yank inside neovim with the yank you just took from outside.
So for instance if I yank two lines in neovim:
Then if I yank outside neovim once it looks like it replaces the first instance with the outside yank:
Then yanking outside neovim again just replaces that with the new yank:
And then yanking inside neovim again will continue to build the yankstack:
This plugin also has the nice feature of letting you cycle yanks easily with <M-p>
and <M-P>
. So if you know the yank you want is 2 yanks back you can just press <M-p>
twice and see it cycle right inline without needing to open a window.
Hi there,
I can't seem to get this piece of config to function as I would expect -
default_register = {'"', '+', '*'}
. I was expecting this to populate :Telescope neoclip with everything in those three registers, but I don't see anything form the '+' or '*' registers. Here is my neoclip setup in my init.nvim:Here is what the :Telescope neoclip shows:
You can see at the top it is saying 'for registers ", +, *', but I don't see the contents of those last two registers. Here is the content of :registers
Any help would be appreciated. Thanks.