1

File:

1111
2222
3333
4444

If I yyP on 2222, the system clipboard is pasted in, not 2222 as expected. However, :reg shows that 2222 was saved to register 0 and ". I expected it to save to th

If I ddP on 4444, everything works as expected: That line is deleted and then 4444 is pasted. So, it seems delete is working as expected, but yank is not.

My current solution is to use delete then undo until I figure out why yanks aren't working.

Notes:

  • vim version 8.1
  • Windows 10
  • _vimrc does not have set clipboard=unnamed.
  • Also, interestingly, delete not only saves to a vim register, but also to the system clipboard. My impression is that this is abnormal, but I do prefer it this way.
  • I typed :set clipboard in command mode and it said clipboard=unnamedplus. I changed it using :set clipboard=unnamed and now vim yanks to the system register, and indeed :set clipboard returns unnamed. However, when I put set clipboard=unnamed in my _vimrc file, it doesn't take effect. Vim is still starting with unnamedplus. Why is this? – JDG Nov 30 '18 at 8:06
1

For some reason, editing _vimrc in the Vim file wasn't working. From within vim, if I used :e! $MYVIMRC to change the file, everything worked out.

I removed set clipboard=unnamedplus and the behavior is now back to normal. Whew!

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.