tmux 复制粘贴

tmux版本(tmux 2.3):

 $tmux -V

 

要想让tmux和系统剪贴板之间互相复制粘贴,在linux中需要先安装 xclip:

sudo apt-get install xclip

 然后在 .tmux.conf 文件中:

# 把当前缓存区的内容复制到系统剪贴板
bind -t vi-copy y copy-pipe "xclip -sel clip -i" 

# 把系统剪贴板内容复制到tmux
bind P run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"

 

posted @ 2018-03-11 16:22  ibg  阅读(1632)  评论(0编辑  收藏  举报