From 2842bba50c57db0791ad0c9a09aaf10d46c49102 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sat, 25 Jan 2025 03:02:07 +0100 Subject: [PATCH] vim:ftplug:man: Move scrolling settings from zprofile --- .config/vim/after/ftplugin/man.vim | 7 +++++++ .config/zsh/.zprofile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/vim/after/ftplugin/man.vim b/.config/vim/after/ftplugin/man.vim index 06e3d9c..9347215 100644 --- a/.config/vim/after/ftplugin/man.vim +++ b/.config/vim/after/ftplugin/man.vim @@ -9,6 +9,13 @@ setlocal nospell " wrapped by vim (i.e. almost all of them). setlocal signcolumn=no +" Make scrolling easier/more reactive through a big scrolloff +setlocal scrolloff=999 + +" Position cursor in the middle when launching so that scrolling down starts +" immediately +normal M + " ------------------------------------------------------------------------------ " From :h :Man: " diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index aec0595..9be4c32 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -126,7 +126,7 @@ export LESS # Use neovim's man plugin as manpager (( ! $+commands[nvim] )) || \ - export MANPAGER='nvim +"Man! | set scrolloff=999 | normal M"' + export MANPAGER="nvim '+Man!'" # NOTE: This is used in keys.zsh for the ALT_C widget FZF_DEFAULT_COMMAND_FALLBACK="find -L . -mindepth 1 \("