From 10e2bbd1c558eba4ba5d3fc0b0ab1c3eb74de975 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 19 May 2015 22:06:00 +0200 Subject: [PATCH] New bind-key in copy-mode vi-like to begin (v) a selection and copy (y) it. New bind-key to send tmux-buffer to X clipboard. --- tmux.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tmux.conf b/tmux.conf index 9760517..c8830f8 100644 --- a/tmux.conf +++ b/tmux.conf @@ -119,16 +119,16 @@ bind ^N next-window unbind ^P bind ^P previous-window -# Créer un nouveau terminal (CTRL+c) +#Copy tmux buffer to CLIPBOARD unbind ^C -#bind ^C new-window -##CLIPBOARD selection integration -##Requires prefix key before the command key -#Copy tmux paste buffer to CLIPBOARD -bind ^C run "tmux show-buffer | xclip -i -selection clipboard" -#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer +bind-key y run-shell -b "tmux save-buffer - | xclip -i -selection clipboard" +#Copy CLIPBOARD to tmux buffer and paste-it in tmux bind ^V run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" +# Copy-mode +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection + # Détacher tmux unbind ^D bind ^D detach