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,2and3to 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.
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 07 '22 at 15:41