Open jocap opened 5 years ago
Hmm, let's start with some small questions: which version of tmux do you have?
Unfortunately, tmux on OpenBSD has no version, as it’s a part of the operating system itself :-) The version, I suppose, is tmux as of OpenBSD 6.3.
Nathan Daly wrote: Hmm, let's start with some small questions: which version of tmux do you have?
I have the same issue, here are all my deets: Arch Linux (4.18.16.arch1-1) tmux 2.8-1 terminal emulator: alacritty 0.2.1-1
relevant bits from ~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g mouse on
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @scroll-without-changing-pane "on"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
set -g @scroll-speed-num-lines-per-scroll "3"
$ tmux list-keys -T root
bind-key -T root MouseDown1Pane select-pane -t = ; send-keys -M
bind-key -T root MouseDown1Status select-window -t =
bind-key -T root MouseDown3Pane if-shell -F -t = "#{mouse_any_flag}" "select-pane -t=; send-keys -M" "select-pane -mt="
bind-key -T root MouseDrag1Pane if-shell -F -t = "#{mouse_any_flag}" "if -Ft= \"#{pane_in_mode}\" \"copy-mode -M\" \"send-keys -M\"" "copy-mode -M"
bind-key -T root MouseDrag1Border resize-pane -M
bind-key -T root WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= \"#{pane_in_mode}\" \"send-keys -M\" \"copy-mode -et=\""
bind-key -T root WheelUpStatus previous-window
bind-key -T root WheelDownStatus next-window
bind-key -T root M-Up select-pane -U
bind-key -T root M-Down select-pane -D
bind-key -T root M-Left select-pane -L
bind-key -T root M-Right select-pane -R
Hopefully I'm just doing something dumb
OS: Linux Mint 19.x Tmux version: 2.9 Less version: 551
I found the solution (at least for myself on Linux Mint 19.x). I was using an older version of less and was using the following option in my LESS environment variable (set in zshrc):
-X or --no-init
Disables sending the termcap initialization and deinitializa‐
tion strings to the terminal. This is sometimes desirable if
the deinitialization string does something unnecessary, like
clearing the screen.
I was doing this for a good reason (that I can't quite remember now), but it made it so less was not sent to an alternate buffer (alternate_on didn't register less as a valid alt process).
Luckily, the latest version of less has mouse support! You just need to do the following:
I'll let you figure out 1 for yourself.
For LESS, here's my config:
LESS="--ignore-case --status-column --LONG-PROMPT --RAW-CONTROL-CHARS"
LESS="$LESS --HILITE-UNREAD --tabs=4 --quit-if-one-screen"
export LESS
export LESS_TERMCAP_mb=$'\E[1;31m' # begin bold
export LESS_TERMCAP_md=$'\E[1;36m' # begin blink
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
export PAGER=less
For tmux, here's the relevant config (assuming you've already configured your mouse correctly)
# Options for: nhdaly/tmux-better-mouse-mode
set -g @scroll-down-exit-copy-mode "on"
set -g @scroll-without-changing-pane "on"
set -g @scroll-in-moused-over-pane "on"
set -g @scroll-speed-num-lines-per-scroll "3"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
Hi!
I installed this plugin today, but unfortunately, the option
@emulate-scroll-for-no-mouse-alternate-buffer
is not working properly for me. Here is my configuration:I'd like to be able to scroll in
less
using my mouse wheel, but it doesn't work.Here's the output of
tmux list-keys -T root
:Have I missed something? I'm running OpenBSD 6.3.