3 ms·
Expanding on pjmlp's comment [0] buried in this thread: export MANPAGER="nvim +Man!" Using Vim's built in ft-man-plugin [1] as the default man pager seems
by tomxor 2y ago
Expanding on pjmlp's comment [0] buried in this thread:
export MANPAGER="nvim +Man!"
Using Vim's built in ft-man-plugin [1] as the default man pager seems to go pretty far towards resolving what the author is complaining about.
Links work, and it respects the indentation when soft wrapping lines. It isn't doing full reflow or regenerating the page, but it maintains legibility while soft wrapping, and messing up indentation is my main annoyance with less... You can improve less by chopping lines -S by default, but then you have horizontal scrolling so neither is great.
[0] In Vim, you can use K to open a man page for the word under the cursor
[1] https://neovim.io/doc/user/filetype.html#ft-man-plugin https://neovim.io/doc/user/filetype.html#ft-man-plugin
- impalallama 2y agothe crawlers are working hard today because I got lead here just by searching for a better man page on kagi I liked the idea of using nvim but i rewrote it with bash function for easier argument handling nman () { if [ $# -ne 1 ]; then echo "Usage: nman <command>" return 1 fi command nvim "+hide Man $1" }
- dannyfritz07 2y agoThank you for this. This is actually quite marvelous. Here is what I'm using for fish: if type -q neovim set -gx MANPAGER "nvim +Man!" # abbr --add man --set-cursor "nvim \"+hide Man %\"" end I can finally retire fisher and decors/fish-colored-man.
- loodish 2y agoThe vanilla vim version is MANPAGER="vim +MANPAGER --not-a-term -" Documentation can be found via :help manpager.vim