From: Iain Patterson Date: Tue, 22 Jan 2013 17:39:13 +0000 (+0000) Subject: Separate bindings to enter and leave mouse mode. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=ee6e2b484a677cfab7c0a2635a41e0ca25b7e750;p=profile.git 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. --- 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.