* Experimental pager: lsp
@ 2025-11-08 22:41 Dirk Gouders
0 siblings, 0 replies; only message in thread
From: Dirk Gouders @ 2025-11-08 22:41 UTC (permalink / raw)
To: util-linux
Hello,
some time ago (in May), I talked to Karel and he told me it would be OK
for him if I write in util-linux about a terminal pager I am working on.
Hopefully some of the experts here will find it interesting
enough and the time to play with it and give some feedback.
The pager's name is lsp - list pages (or least significant pager).
Perhaps somewhat unlucky, because of "Language Server Protocol", but
when I started it and searched the web I didn't realize any name
collisions.
Anyway, you will certainly ask "Who needs just another pager?".
I implemented some features I was always missing in other pagers:
- On window resizes, reload manual pages to fit the new window size.
- Manual pages refer to others: allow to navigate to them.
(And offer such links only if those manual pages exist on the running
system, i.e. validate those references.)
- Allow to open other manual pages and to switch among all opened files.
Besides these "musts", I implemented a 3-level TOC mode that allows for
faster (or a different way of) navigation in large manual pages.
Further, an apropos buffer can be created to have all manual pages
available and be able to visit them.
Another nuance is the positioning of search matches: when I walk through
git logs, I often want to move commit-wise and ideally have the
commits starting in the first line. In lsp I search for "^commit",
press ^l twice and from then on 'n' navigates to the next commit,
positioning it to the first line.
A latest feature that I implemented is the possibility to restart the
parent process (currently only git). I find this useful when I do
`git diff` before adding changes and realize whitespace changes or other
small nits. I then keep the diff-session, correct those nits in my
editor and in the diff-session just press 'r' to see those changes.
Finally, the negative part: lsp currently has no raw mode, i.e. it uses
ncurses and does all interpretation of SGR and backspace sequences.
Raw mode is the next thing I want to realize.
In case you are interested, lsp can be found at:
https://github.com/dgouders/lsp
Please use the next branch that has some recent fixes.
If you use Gentoo, lsp can be found in the GURU repo.
But manual installation isn't that hard, because ncurses is lsp's single
dependency, besides meson for installation.
Thank you and pardon in case you feel disturbed by this,
Dirk
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-08 22:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-08 22:41 Experimental pager: lsp Dirk Gouders
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).