On mu Ubuntu 12.04 setups my tmux clipboard copy and paste commands are setup as follows:
set -g prefix M-a
unbind C-b
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
This worked great for the longest time up until a month or so ago, when I suspect some configuration change or package change was made that broke the above. In GNOME terminal, pasting still works fine with both prefix+ctrl-v and ctrl-shift-v.
However the xclip
copy command no longer works no matter what I do, and I have tried removing the custom prefix binding above, using -select
instead of -sel
, not using clipboard
etc. This is pretty much a show stopper for a GVim user like me, since I don't even have the GNOME terminal workaround of ctrl-shift-c with tmux taking over the shell. I go into copy mode, select text with space+movement, and when I execute prefix+ctrl-c absolutely nothing happens. Before this broke, tmux would display a confirmation message in the notification section at the bottom.
Does anybody have suggestions as far as how one might debug this? This is a pretty big productivity hit. I can probably use the temporary file workaround trick for now, but it'd be great to know just what happened to xclip
.
type xclip
?xsel -b
?xsel -i -b
does seem to do the trick!xsel -b
andxclip -selection clipboard
would do the same thing!