6

The problem is that copy/paste from/to vim to the clipboard stopped working. I'm not sure why...

In :reg I don't see the + and * buffers too...

Here's my .vimrc, if needed.

Any suggestions?

Thanks!

brslv
  • 526
  • 7
  • 16

1 Answers1

8

OK, I figured it out. The problem was I was using the system vim (the one, preinstalled on my Mac). I've find it out with: which vim. It returned /usr/bin/vim. The problem with the default vim is that it's not compiled with the clipboard option (run vim --version | grep clipboard and if you see -clipboard, it means you don't have the "copy/paste to/from clipboard functionality).

Now, if you don't have vim installed with the homebrew, install it. Than, in your .zshrc (or .bashrc) file, provide the path to the /usr/local/bin file, so that it overrides the /usr/bin (before it). Now you're using the homebrew's vim, which comes with the +clipboard option enabled.

Have fun copy-pasting. :)

brslv
  • 526
  • 7
  • 16
  • Right on, you just have to make sure you do this: https://stackoverflow.com/a/24621347/1254111 otherwise you will still be loading the ``default`` vim. This is what I did in my ``.zshrc``: ``export PATH=/usr/local/bin:$PATH`` – betoharres Jun 03 '18 at 05:30
  • I dunno why this question is marked as duplicated, while the "original" question has thousands of answers that do not point out this simple solution. – betoharres Jun 03 '18 at 05:35