From 5d337d97e4d218f1748e34cb6b52bbfb6ea83f27 Mon Sep 17 00:00:00 2001 From: thek4n Date: Fri, 5 Apr 2024 11:34:59 +0300 Subject: [PATCH] feat(tmux): map v to toggle selection in copy mode --- home/user/.config/tmux/mappings.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index ef69d7f..ae706dc 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -2,6 +2,7 @@ set -g prefix C-b +bind C-b send-prefix # Toggle local tmux mappings to allow control remote tmux @@ -83,7 +84,8 @@ setw -g mode-keys vi bind v copy-mode bind p paste-buffer -bind -T copy-mode-vi v send-keys -X begin-selection +## Toggle selection +bind -T copy-mode-vi v if -F '#{selection_active}' 'send-keys -X clear-selection' 'send-keys -X begin-selection' bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind -T copy-mode-vi C-v send-keys -X rectangle-toggle