I'd like to use the scroll wheel (xterm mouse escape codes) to scroll through man pages, like I can in emacs with xterm-mouse-mode
. less doesn't seem to have support for that and short of recompiling it I can't find a way to add it.
Is there a different pager I could use that supports the scroll wheel (or a way I could get less to do it)? I'd rather not give up bold and underline if possible.
My emulator is iTerm2 on Mac OS X Yosemite, if that helps.
Best Answer
w3m can be a decent pager (though I do prefer less). It supports the mouse (you may need to enable this in the configuration), including scrolling.
Vim is a text editor but can be used as a pager: set
PAGER='vim -R'
. You can enable mouse support withset mouse=a
in your~/.vimrc
. The wheel works at least in xterm, I can't vouch for OSX's terminal emulator.