Skip to content

Instantly share code, notes, and snippets.

@yuifu
Last active May 15, 2021 03:25
Show Gist options
  • Save yuifu/417d8e266630a9c0612273400875ba68 to your computer and use it in GitHub Desktop.
Save yuifu/417d8e266630a9c0612273400875ba68 to your computer and use it in GitHub Desktop.
# tmux config options for mouse scroll
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Scroll History
set -g history-limit 30000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment