From 4e3ce4f9d9befa3b86364e3b9749df4bcb39d8ec Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sun, 12 Apr 2026 01:18:13 +0800 Subject: [PATCH] feat(tmux): prevent tmux from exiting copy mode after selection with mouse see: - https://www.reddit.com/r/tmux/comments/v73005/how_to_prevent_tmux_from_exiting_copy_mode_after/ - https://www.reddit.com/r/tmux/comments/1ltms6a/how_to_select_text_in_tmux_without_having_it_jump/ --- .tmux.conf2 | 1 + 1 file changed, 1 insertion(+) diff --git a/.tmux.conf2 b/.tmux.conf2 index edcb127..b026223 100644 --- a/.tmux.conf2 +++ b/.tmux.conf2 @@ -28,6 +28,7 @@ bind | split-window -h -c "#{pane_current_path}" bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded" bind m run 'old=$(tmux show -gv mouse); new="off"; if [ "$old" = "off" ]; then new="on"; fi; tmux set -g mouse $new && tmux display-message toggle\ mouse\ mode\ $new' bind C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x # styles # status bar