An Emacs command to quickly navigate to keywords within a man page.
- Emacs Lisp 100%
|
|
||
|---|---|---|
| LICENSE | Initial commit | |
| man-index.el | wording | |
| README.md | tweak use-package example | |
man-index.el
Use the man-index command to navigate to topics within the current
man page. This is similar to Man-goto-section but more
granular. Bind it to i in man-mode to match the Info-index binding:
(with-eval-after-load "man"
(define-key Man-mode-map "i" 'man-index))
Or with use-package:
(use-package man-index
:vc (:url "https://codeberg.org/imarko/man-index")
:after man
:bind
(:map Man-mode-map
("i" . man-index)))
Since man pages don't really have a concept of a keyword index we have
to work what we have. Currently man-index-build picks up words or
phrases that are at the beginning of the line with 2-8 spaces in front
of them and use the Man-overstrike face.
This is currently at the "works for me... sometimes" level of
usability. I have tested it with random man pages I happened to be
using: fennel-reference, tmux, mpv, jq.