SSH 会话中 TMUX 中的系统剪贴板 Vim [英] System Clipboard Vim within TMUX within SSH session
问题描述
我在 ssh 会话中的 tmux 中打开了 vim.如何让 vim 使用我笔记本电脑的系统剪贴板作为默认复制粘贴?默认的 set clipboard=unamed
不起作用.两个系统都是 Ubuntu,以防万一.
I have vim open inside tmux inside an ssh session. How can I make vim use my laptop's system clipboard as the default copy paste? The default set clipboard=unamed
isn't working. Both systems are Ubuntu in case that matters.
推荐答案
你需要做两件事.
在您的远程系统上,安装可识别剪贴板的 Vim(以及剪贴板支持所需的 X 依赖项):
On your remote system, install a clipboard-aware Vim (and the X dependencies needed for clipboard support):
$ sudo apt-get install vim-gtk
在您的本地系统上,在启用 X11 转发的情况下启动 ssh 会话:
On your local system, start your ssh session with X11 forwarding enabled:
$ ssh -X user@hostname
有关 X11 转发的安全隐患,请参阅 $ man ssh
.
See $ man ssh
for the security implications of X11 forwarding.
这篇关于SSH 会话中 TMUX 中的系统剪贴板 Vim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!