From c3109181d645c46359784045696577a7254a77d1 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 23 Jun 2025 20:13:13 +0100 Subject: [PATCH] Enable C-v for toggling rectangle selection in copy mode --- tmux.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmux.conf b/tmux.conf index 20dde85..f6a7a2a 100644 --- a/tmux.conf +++ b/tmux.conf @@ -93,9 +93,9 @@ bind C-u copy-mode -u # Begin selection in copy mode with v not Space bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi V send -X select-line -# FIXME: C-v mapping is not limited to only copy mode so it never gets through -# to zsh/nvim etc which is not acceptable. -# bind -T copy-mode-vi C-v send -X rectangle-toggle +bind -n C-v if-shell -F '#{pane_in_mode}' \ + 'send -X rectangle-toggle' \ + 'send-keys C-v' # Exit copy mode with i/a bind -T copy-mode-vi 'i' send -X cancel bind -T copy-mode-vi 'a' send -X cancel