Vim & Mac: How to copy to clipboard without pbcopy

微笑、不失礼 提交于 2019-12-07 03:09:26

+xterm_clipboard is useless on a Mac: it won't help you get clipboard support at all.

You have MacVim installed, why don't you simply use it since it has clipboard support? Too easy?

Also, :set clipboard^=unnamed is a good idea in theory but it can clobber your clipboard history pretty quickly so… try it for a while to see if it works with you.

I don't know what's the problem with the clipboard (it looks fine, seems to be specific to Vim on Mac OS / MacVim), but:

I wish to not need to use "* or "+ and just use y

That can be achieved with :set clipboard^=unnamed and :set clipboard^=unnamedplus, respectively.

benjifisher

I think the problem is this line from vim --version:

Huge version without GUI.

Try using /Applications/MacVim.app/Contents/MacOS/Vim instead (assuming the standard installation location). See How to run mvim (MacVim) from Terminal? for more information. (Wow! I did not realize that the mvim script was based on my own hack.)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!