|
|
|
|
|
by oso2k
2307 days ago
|
|
You can but you need to change the mouse mode In newer versions of tmux set -g mouse-mode on
# make scrolling with wheels work
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
|
|
That's the thing with these .tmux.conf hacks you see floating around github and stack overflow. The tmux devs changed the relevant settings practically every other release and offered no compatibility, so most of what you find just doesn't work with your build.
But even those snippets that do work with my builds, you can't have it all. Either scrolling up takes you past the panes and into the std output of the native shell, or you enable mouse mode and can scroll in your shell but loose the ability to scroll in editors like nano and programs like less.
Maybe if there was a way to automatically turn off mouse mode when running programs and flick it back on when exiting to the command line, but I'm not well versed enough in the .tmux.conf syntax to figure it out without too much trouble.