From ee6e2b484a677cfab7c0a2635a41e0ca25b7e750 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 22 Jan 2013 17:39:13 +0000 Subject: [PATCH] Separate bindings to enter and leave mouse mode. As of tmux 1.7 the mouse-mode option can take one of three possible values, namely on/off/copy-mode. We can no longer use ^m to toggle between all mouse options because toggling only works for on/off values. Instead use ^m to enable mouse options with copy mode, and alt-m to disable the options. --- .tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 5dc79dc..2ac48a8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -141,7 +141,10 @@ bind { copy-mode -u bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1' bind "'" new-window -n "[buffer]" "cat > /dev/null" \; paste-buffer # Toggle mouse mode as it is useful despite the flaws listed above. -bind C-m set -g mouse-resize-pane \; set -g mouse-select-pane \; set -g mouse-select-window \; set -g mode-mouse +# As of tmux 1.7 mode-mouse has three possible values so we can no +# longer use an implied toggle. +bind C-m set -g mouse-resize-pane on \; set -g mouse-select-pane on \; set -g mouse-select-window on \; set -g mode-mouse copy-mode +bind M-m set -g mouse-resize-pane off \; set -g mouse-select-pane off \; set -g mouse-select-window off \; set -g mode-mouse off ################################################################################ # Fix missing binds in Vi modes. -- 2.20.1