Hacker News new | ask | show | jobs
by teddyh 1419 days ago
The “less” program understands the standard cursor keys just fine; there is no need to use vi-style keys.
1 comments

You can even use the scroll wheel (so can vim, accursedly)
No, I'm pretty sure that’s your terminal emulator capturing the scroll wheel events and translating them to cursor key events.

  LESS(1)
[...]

       --mouse
              Enables mouse input: scrolling the mouse wheel down moves
              forward in the file, scrolling the mouse wheel up moves
              backwards in the file, and clicking the mouse sets the "#"
              mark to the line where the mouse is clicked.  The number
              of lines to scroll when the wheel is moved can be set by
              the --wheel-lines option.  Mouse input works only on
              terminals which support X11 mouse reporting, and on the
              Windows version of less.
----

  5. Using the mouse                                      *mouse-using*
[...]

  Don't forget to enable the mouse with this command: >
          :set mouse=a
  Otherwise Vim won't recognize the mouse in all modes (See 'mouse').

  Currently the mouse is supported for Unix in an xterm window, in a *BSD
  console with |sysmouse|, in a Linux console (with GPM |gpm-mouse|), for
  MS-DOS and in a Windows console.
[...]

                                                          *xterm-mouse-wheel*

  To use the mouse wheel in a new xterm you only have to make the scroll wheel
  work in your Xserver, as mentioned above.
OK, but those are not enabled by default. BTW, Emacs also has it as an available feature: M-x xterm-mouse-mode