1

Previously, whenever I typed "+yy in vim, it yanked a line to the system clipboard.

I reinstalled the OS again, and, when I try to do the same now the input disappears after entering +.

Steps:

  1. I type " and vim shows "
  2. I type + and vim disappears

How do I make it accept "+yy?

  • 1
    Welcome to Vi and Vim! If you press yy when the quote disappears, does it yank to the clipboard or the default register? – D. Ben Knoble Jul 5 at 12:32
  • Got it, anyways it doesnt yank to system clipboard but register. Also checkout my answer – Dipesh Sunrait Jul 5 at 12:36
2

After talking to my friend in Discord about Vim. I found out that my clipboard is disabled. :version shows -clipboard.

I did some research and found the vim-gnome package that fixes it. However, since I hadn't installed gnome, I found an alternative called vim-gtk3. I installed it, and now I can copy to the system clipboard.

| improve this answer | |

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