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