A Better Man Page Viewer by todsacerdoti
We open up man pages for all kinds of CLI commands everyday. We should have a
frictionless man page viewer that stands up to the task.
After recently reading Man pages are great, man readers are the
problem ↗,
I was curious what a better viewer would be and why we put up with the one that
is built-in. Chief among the issues with the default viewer, as the article
points out, is that there is no way to follow the links between man pages.
Instead, you have to close the one you’re viewing and issue another man
command for another page.
That’s when I remembered. I already have a better man page viewer. One that is
right at my fingertips, in the right context. That context being while I
already have a Vim/Neovim session open.
Usually when I’m writing a bash script or shelling-out a one-off command, I’ll
try to remember “that one flag”. Is it -a
or -s
? I want to be sure, so
right from my (Neo)vim session I use the man page plugin to check (:Man pg_dump
).
We’re not limited to only using this when we have a (Neo)vim session already
running. We can override what man
uses by exporting a different MANPAGER
command.
Right from the Neovim Man plugin help page:
This