From 0979c949f41a6f8015cc2396a4cd86af1002661f Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 17 Feb 2024 20:45:36 +0100 Subject: [PATCH] tmux vim copy mode --- dot_tmux.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dot_tmux.conf b/dot_tmux.conf index 3ef1e16..a222b02 100644 --- a/dot_tmux.conf +++ b/dot_tmux.conf @@ -24,8 +24,20 @@ set -g mouse on # don't rename windows automatically set-option -g allow-rename off -#set-window-option -g mode-keys vi +# vim mode for copying +setw -g mode-keys vi +# prefix + v to enter copy mode +bind v copy-mode +# v to start a visual selection +bind -T copy-mode-vi v send -X begin-selection +# y to yank +bind -T copy-mode-vi y send -X copy-pipe-and-cancel +# prefix + P to paste +bind P paste-buffer +# mouse support +bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel +# color support set -g default-terminal "xterm-256color" set -ga terminal-overrides ",xterm-256color:Tc"