zsh:funcs:nvim-man: Use minimal config + scrolloff

Load only the `man.vim` plugin, nothing else. This should speed up the
startup a bit. It will never be as fast as `less` though, as it loads
the whole file first.
This commit is contained in:
2022-02-03 16:06:08 +01:00
parent 27d537a02a
commit 1be26adfc9

View File

@@ -403,7 +403,7 @@ nvim-man() {
if (( $+commands[nvim] )) && [[ $# -eq 1 ]]; then if (( $+commands[nvim] )) && [[ $# -eq 1 ]]; then
# $MANPAGER does the trick too but lines are hard-wrapped. # $MANPAGER does the trick too but lines are hard-wrapped.
nvim +"Man $1 | only" nvim -u NORC +"runtime! plugin/man.vim | Man $1 | only | set scrolloff=999 | normal M"
else else
command man "$@" command man "$@"
fi fi