I'm running tmux 1.6 and I'm trying to configure it to use vi-style keybindings as well as use the system clipboard when copying in interactive mode:
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' "copy-selection && run \"tmux save-buffer | xclip -selection clipboard\""
Simply put, I'd like to be able to do C+[ and then use v to begin selecting text for copying, then when y is pushed, copy the selection to the tmux selection and then export it to the system clipboard using xclip
.
Unfortunately, when I try to do this, I see the following:
.tmux.conf: 14: unknown command: copy-selection && run "tmux save-buffer | xclip -selection clipboard"
Is there a way to do this in tmux configuration?