4 ms·
If you know basic vim movements (j/k for down/up kind of basic stuff), you can pipe the output into less to read it in a more convenient way. Nothing major, jus
by nstart 4y ago
If you know basic vim movements (j/k for down/up kind of basic stuff), you can pipe the output into less to read it in a more convenient way. Nothing major, just found it nicer to not have to scroll back up when the article loads
Example:
curl https://mahdi.blog/raw/self-hosted/ https://mahdi.blog/raw/self-hosted/ | less
- teddyh 4y agoThe “less” program understands the standard cursor keys just fine; there is no need to use vi-style keys.
- mgdlbp 4y agoYou can even use the scroll wheel (so can vim, accursedly)
- teddyh 4y agoNo, I'm pretty sure that’s your terminal emulator capturing the scroll wheel events and translating them to cursor key events.
- mgdlbp 4y agoLESS(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.
- teddyh 4y agoOK, but those are not enabled by default. BTW, Emacs also has it as an available feature: M-x xterm-mouse-mode