如何使Brew通过+ clipboard安装Vim? [英] How to make Brew install Vim with +clipboard?

查看:90
本文介绍了如何使Brew通过+ clipboard安装Vim?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚如何在用Vim编辑的文件和macOS剪贴板之间进行复制和粘贴.大多数说明说首先使用Homebrew安装Vim,因为它将在启用剪贴板选项的情况下进行安装(vim --version将显示"+ clipboard").但是,当我使用brew安装Vim时,剪贴板选项仍设置为"-clipboard".我可以强迫brew重新安装Vim并在此过程中打开此选项吗?我正在使用安装了VIM 7.4的Homebrew 1.1.2.

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.

推荐答案

由于Homebrew不再在命令行上使用软件包特定的选项,因此您需要编辑公式以增加对剪贴板的支持,然后告诉brew从源代码安装而不是从瓶子里来.

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

从此解决方案中总结: https://coderwall.com/p/avmotq /gain-clipboard-support-for-vim-on-os-x

Summarized from this solution: https://coderwall.com/p/avmotq/gain-clipboard-support-for-vim-on-os-x

这篇关于如何使Brew通过+ clipboard安装Vim?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆