I can copy text from Vim to other Mac applications with "*y. But when I try to paste into Vim, from TextEdit for example, I cannot paste text with "*p. Is there some setting that I missed?
"*p and "*y don't work in the default Vim shipped with OS X simply because it was not compiled with clipboard support.
You may be led to believe that they work, somehow, because Vim won't complain if you use a non-existing register and yank in or put from the default register instead. :reg + and :reg * should show no content at all.
It's easy to verify if your Vim comes with clipboard support. The following command
$ /path/to/vim --version | grep clipboard
should find -clipboard and -xterm-clipboard which mean "no clipboard support".
The only practical way to have clipboard support is to install a proper Vim build, either by downloading MacVim, by using a package manager like Homebrew or Macports or by compiling it manually. I'd suggest the first option: it's the least geeky but the simplest and fastest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With