I'm trying to figure out how to copy-and-paste between a file edited with Vim and the macOS Clipboard. Most instructions say to start by installing Vim using Homebrew as it will be installed with the clipboard option enabled (vim --version will display "+clipboard"). However, when I installed Vim using brew, the clipboard option was still set to "-clipboard". Can I force brew to reinstall Vim and turn this option on in the process? I'm using Homebrew 1.1.2 which installed VIM 7.4.
Because Homebrew no longer takes package specific options on the command line you need to edit the formula to add support for the clipboard back and then tell brew to install from source and not from a bottle.
brew uninstall vim
brew edit vim
# Add `"--enable-clipboard",` after the `./configure` in the list of other options.
brew install -s vim
Summarized from this solution: https://coderwall.com/p/avmotq/gain-clipboard-support-for-vim-on-os-x
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