Last active
June 21, 2016 16:57
-
-
Save Echostream/d37e0bc0b545dabcdb6416c6b4b94b98 to your computer and use it in GitHub Desktop.
Enable mouse actions in tmux 2.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g mouse on | |
set -g mouse-utf8 on | |
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M | |
bind -n WheelDownPane select-pane -t= \; send-keys -M | |
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M | |
#Press Ctral for scrolling faster | |
bind -t vi-copy C-WheelUpPane halfpage-up | |
bind -t vi-copy C-WheelDownPane halfpage-down | |
bind -t emacs-copy C-WheelUpPane halfpage-up | |
bind -t emacs-copy C-WheelDownPane halfpage-down | |
bind -n MouseDrag1Pane if -Ft= "#{mouse_any_flag}" 'if -Ft= "#{pane_in_mode}" "copy-mode -M" "send-keys -M" ' "copy-mode -M; send-key -M; run 'sleep 1; tmux save-buffer - | xclip -i >/dev/null'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment