From 1be26adfc93defd9922c5ac815f1fc2a90493320 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 3 Feb 2022 16:06:08 +0100 Subject: [PATCH] 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. --- .config/zsh/zshrc.d/40-functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index bd08b5e..c5ec5d8 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -403,7 +403,7 @@ nvim-man() { if (( $+commands[nvim] )) && [[ $# -eq 1 ]]; then # $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 command man "$@" fi