Blogmark
Man pages are great, man readers are the problem
via jbranchaud@gmail.com
The author makes the point that while the file format for Man pages is great and can do a lot of things, the typical man page reader is lackluster.
We need better man page readers. Ones that let us follow references as links.
While I often use the default pager for quickly referencing a man page, I also really like to use the Man plugin for Vim / Neovim. Note: with Vim, the plugin is available, but needs to be enabled in your config (runtime ftplugin/man.vim
). It's enabled by default in Neovim.
From a (Neo)vim session, I can open a specific man page with :Man
like so:
:Man git-restore
From there, I'm in a mostly-standard read-only Vim buffer with the Man plugin providing a couple conveniences like color, link following, and hitting q
to quit. At the same time, I can still do all kinds of Vim things like motions for quickly moving around and search to find occurrences of a specific word or pattern.
The big complaint of this article is that link following doesn't work. With Vim, we can move the cursor over a link and hit either K
or Ctrl-]
to follow it. And then you still get Vim navigation like Ctrl-o
to jump back to the previous man page and cursor position.
We can also configure Neovim to be the default man pager on our system by adding the following to our shell config:
export MANPAGER='nvim +Man!'
This was recommended in the help file for the Man plugin (:h :Man
).
I also noticed recently that Dash can slurp up all the man pages on your system to make them searchable and browsable. The man page links work in their docs browser.