Fix man pager

This commit is contained in:
Akemi Izuko 2023-11-12 16:44:13 -07:00
parent 3aff048913
commit c05c613c8d
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
2 changed files with 3 additions and 6 deletions

View file

@ -33,6 +33,7 @@ alias ra='rg --no-ignore -.'
alias ee='exit'
alias ffprobe='ffprobe -hide_banner'
alias shm='cd /dev/shm'
alias ip='ip -color'
# ===================================================================
@ -109,7 +110,7 @@ fi
# nVim
if command -v nvim &> /dev/null; then
alias vi='nvim' vih='nvim +Rooter'
alias vit='nvim +"tnoremap <C-k> <C-\><C-n>" +startinsert +terminal '
alias vit='nvim +startinsert +terminal '
elif command -v vim &> /dev/null; then
alias vi='vim' vih='vim +Rooter'
fi

View file

@ -57,11 +57,7 @@ export MANWIDTH=90
export GIT_PAGER='' # Vim can't properly read git-diff colors
if [[ "$(uname -s)" == "Linux" ]] && command -v nvim &>/dev/null; then
export PAGER="/bin/sh -c \"unset PAGER;col -b -x | \
nvim -R -c 'set ft=man nomod nolist' -c 'map q :q<CR>' \
-c 'silent! %s/\v[0-9]+;[0-9];[0-9]+;[0-9]+;[0-9]+m//g' \
-c 'silent! %s/0m//g' \
-c 'nmap K :Man <C-R>=expand(\\\"<cword>\\\")<CR><CR>' -\""
export MANPAGER='nvim +Man!'
fi
# Config =============================================================