I use export LESS=-R to enable scrolling through less output using mouse scroll. It doesn’t work in tmux. For vim, the solution was to add set mouse=a. What is the equivalent option for less assuming there is one at all?
Asked
Active
Viewed 1,312 times
2
Ilias Karim
- 393
- 1
- 2
- 14
-
1Possible duplicate of [Pass mouse events through tmux](https://superuser.com/questions/989505/pass-mouse-events-through-tmux) – Kamil Maciorowski Oct 17 '19 at 14:26
2 Answers
3
The latest versions of less support mouse input with the --mouse and related flags.
Nomas Prime
- 139
- 3
-
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/1007627) – music2myear Sep 30 '20 at 01:48
-
2Yes it does. The author's asking for the equivalent of Vim's `mouse` option in less which is currently `--mouse`. My answer is analogous to the previous answer but updated for recent versions of less. I don't understand your comment, how am I not answering the question? – Nomas Prime Oct 01 '20 at 02:18
-
Exporting `LESS='--mouse'` makes less scroll with the mouse in tmux for me. Without that, tmux tries to scroll the scrollback. This seems to answer the question to me. – andyg0808 May 21 '21 at 23:56
0
less does not support the mouse. Probably your terminal sends Up and Down keys for the mouse wheel for applications that don't support the mouse, but tmux does not do this by default. There is some information on this and an example of key bindings to do this here: https://github.com/tmux/tmux/issues/1320#issuecomment-381952082
Nicholas Marriott
- 942
- 5
- 4