0

I use set clipboard=unnamed in my configuration. When I open nvim with nvim, the clipboard is left unchanged but if I open with nvim . the latest entry of the clipboard is always something unexpected.

For example, let's say I do the following:

  • using Alfred, I run "Clear Clipboard History".
  • using the terminal, I run pbcopy < /dev/null.
  • I add 1, 2 and 3 to my clipboard history. I can see those entries using Alfred
  • I open nvim with nvim .

My clipboard history is showing:

4
3
2
1

4 isn't expected here. I don't always see a number like 4 but I always get something I don't want as the latest entry. I got the feeling nvim keeps some sort of history somewhere and populates the clipboard on startup. I run the same experience with vim and gvim and I get:

  • vim:
../
  • gvim :
3
2
1

What I see with gvim is the behavior I expect. Here is my complete .vimrc file.

2
  • vim . should open the current directory in netrw (not sure about neovim), so I'm confused what that has to do with the clipboard pieces. Maybe have a look at How to debug my vimrc and see if you can reproduce this with a smaller vimrc
    – D. Ben Knoble
    Jul 7 at 15:41
  • Thanks @D.BenKnoble. After you pointed out netrw, I found a solution by removing tpope/vim-vinegar plugin.
    – mathieux51
    Jul 11 at 19:55

1 Answer 1

0

I removed the plugin tpope/vim-vinegar and now everything works as expected. I browsed couple of issues, like this one, and it seems this is a netrw bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.