vim:nvim-man: Source vimrc and fix weird input

Remove `NORC` as settings like `smartcase` or my color scheme are things
I do not want to miss and the startup time delta feels negligible.

Fix a weird issue with presumably the line breaks and tabs in the
command string that would make vim send key inputs when starting through
`nvim-man`. This would lead to tmux switching panes and tmux-resurrect
failing to recover panes with vim opened like this.
This commit is contained in:
2022-09-08 17:41:41 +02:00
parent 048933e67d
commit 515dbf1117

View File

@@ -401,13 +401,7 @@ nvim-man() {
command man -w "$1" >/dev/null || return
# $MANPAGER would do the trick too but lines would be hard-wrapped.
nvim -u NORC +"
runtime! plugin/man.vim |
Man $1 |
only |
set scrolloff=999 |
normal M
"
nvim +"Man $1 | only | set scrolloff=999 | normal M"
else
command man "$@"
fi