ctrl-v to paste the X buffer and ctrl-y to send the tmux buffer to X

This commit is contained in:
Kevin MacMartin 2014-08-29 04:30:09 -04:00
parent 0d9d10eaeb
commit 633601dd57
3 changed files with 9 additions and 0 deletions

View file

@ -31,6 +31,7 @@
* `Escape`: Clear the terminal history, tmux history and the current window/pane. * `Escape`: Clear the terminal history, tmux history and the current window/pane.
* `?` and `/`: Show help for available key bindings and commands respectively. * `?` and `/`: Show help for available key bindings and commands respectively.
* `y` and `Ctrl-p`: Enter __copy mode__ and paste from the copy buffer respectively. * `y` and `Ctrl-p`: Enter __copy mode__ and paste from the copy buffer respectively.
* `Ctrl-v` and `Ctrl-y`: Pastes the X buffer in tmux, and sends the tmux buffer to X respectively.
* (**copy mode**) `v`, `y` and `Escape`: Begin selection, copy selection and cancel **copy mode** respectively. * (**copy mode**) `v`, `y` and `Escape`: Begin selection, copy selection and cancel **copy mode** respectively.
* `Alt-[0-9]` (no prefix): Switch directly to the given window. * `Alt-[0-9]` (no prefix): Switch directly to the given window.
* `W`: Write scrollback buffer to file. * `W`: Write scrollback buffer to file.

View file

@ -111,6 +111,10 @@ bind / list-commands
bind y copy-mode bind y copy-mode
bind C-p paste-buffer bind C-p paste-buffer
# #
# C-v and C-y to paste the X buffer, or copy the tmux buffer into X
bind C-v run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
bind C-y run "tmux show-buffer | xclip -sel clip"
#
# (copy mode) v,y and escape to select, copy and cancel respectively # (copy mode) v,y and escape to select, copy and cancel respectively
bind -t vi-copy y copy-selection bind -t vi-copy y copy-selection
bind -t vi-copy v begin-selection bind -t vi-copy v begin-selection

View file

@ -111,6 +111,10 @@ bind / list-commands
bind y copy-mode bind y copy-mode
bind C-p paste-buffer bind C-p paste-buffer
# #
# C-v and C-y to paste the X buffer, or copy the tmux buffer into X
bind C-v run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
bind C-y run "tmux show-buffer | xclip -sel clip"
#
# (copy mode) v,y and escape to select, copy and cancel respectively # (copy mode) v,y and escape to select, copy and cancel respectively
bind -t vi-copy y copy-selection bind -t vi-copy y copy-selection
bind -t vi-copy v begin-selection bind -t vi-copy v begin-selection