Last active
January 10, 2018 07:51
-
-
Save T1T4N/599e49ef27014655599d0bbddc7948ba to your computer and use it in GitHub Desktop.
tmux 2.5 emulate scrolling by sending up/down keys for specified commands
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
# Emulate scrolling by sending up and down keys if these commands are running in the pane | |
tmux_commands_with_legacy_scroll="'nano less more man'" | |
bind -n WheelUpPane if "[[ #{tmux_commands_with_legacy_scroll} =~ #{pane_current_command} ]]" "select-pane -t = ; send-keys Up" 'if-shell -F -t = "#{mouse_any_flag} || #{pane_in_mode}" "send-keys -M" "copy-mode -et="' | |
bind -n WheelDownPane if "[[ #{tmux_commands_with_legacy_scroll} =~ #{pane_current_command} ]]" "select-pane -t = ; send-keys Down" 'if-shell -F -t = "#{mouse_any_flag} || #{pane_in_mode}" "send-keys -M" "copy-mode -et="' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment