Vim

mac ubuntu同步vim粘贴板

2015-05-11  本文已影响0人  wasw100

http://unix.stackexchange.com/questions/35285/is-there-a-clipboard-on-non-gui-ubuntu-linux-systems-can-i-synchronize-it-wit

ubuntu的vim:

sudo apt-get install vim-gtk

mac:

brew install vim

需要配置下 .vimrc

set clipboard=unnamed

mac os x中x11的安装:
https://support.apple.com/zh-cn/HT5293

步骤:

It sounds like you were using a version of vim compiled without +xterm_clipboard. You can check viavim --version | grep xterm_clipboard
. I havevim-nox
andvim-gtk
installed on my ubuntu server.
Details here: [http://www.lowlevelmanager.com/2012/09/osx-remote-vim-clipboard-sync.html](http://www.lowlevelmanager.com/2012/09/osx-remote-vim-clipboard-sync.html)

.ssh/config类似下面的配置:

Host home
    ForwardX11 yes
    ForwardX11Trusted yes
    Hostname 10.0.0.7
    User ubuntu

mac下的x11的设置需勾选下:

选中Pasteboard下的tab下的: Update Pasteboard immediately when new text is selected

如果ssh主机很慢, 可以在.bash_profile下配置下DISPLAY环境变量, 具体值如下设置:

xauth list

找到类似 losthost:0 这样的值设置即可(有的电脑不是这样的值)

上一篇 下一篇

猜你喜欢

热点阅读