From :h :Man: > when running `man` from the shell and with that `MANPAGER` [='nvim > +Man!'] in your environment, `man` will pre-format the manpage using > `groff`. Thus, Nvim will inevitably display the manual page as it was > passed to it from stdin. One of the caveats of this is that the width > will _always_ be hard-wrapped Since I actually don't like `g:man_hardwrap=0`/`MANPAGER=999` (e.g. scrolling can be a mess with very long wrapped lines), add an autocommand that is meant to reload the manpage through `:edit` after every resize, so that its hard-wrapping adjusts to the new size. This is slightly hacky, but does its job quite well. Move the man.vim into after/ftplugin so that it overwrites the `set wrap` of the global ftplugin, which I want turned off, since it messes with the buffer shortly when resizing.
2.2 KiB
2.2 KiB