Fix man pager
This commit is contained in:
parent
29a85dd023
commit
25f71a8557
|
@ -33,6 +33,7 @@ alias ra='rg --no-ignore -.'
|
||||||
alias ee='exit'
|
alias ee='exit'
|
||||||
alias ffprobe='ffprobe -hide_banner'
|
alias ffprobe='ffprobe -hide_banner'
|
||||||
alias shm='cd /dev/shm'
|
alias shm='cd /dev/shm'
|
||||||
|
alias ip='ip -color'
|
||||||
|
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
|
@ -109,7 +110,7 @@ fi
|
||||||
# nVim
|
# nVim
|
||||||
if command -v nvim &> /dev/null; then
|
if command -v nvim &> /dev/null; then
|
||||||
alias vi='nvim' vih='nvim +Rooter'
|
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
|
elif command -v vim &> /dev/null; then
|
||||||
alias vi='vim' vih='vim +Rooter'
|
alias vi='vim' vih='vim +Rooter'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -57,11 +57,7 @@ export MANWIDTH=90
|
||||||
export GIT_PAGER='' # Vim can't properly read git-diff colors
|
export GIT_PAGER='' # Vim can't properly read git-diff colors
|
||||||
|
|
||||||
if [[ "$(uname -s)" == "Linux" ]] && command -v nvim &>/dev/null; then
|
if [[ "$(uname -s)" == "Linux" ]] && command -v nvim &>/dev/null; then
|
||||||
export PAGER="/bin/sh -c \"unset PAGER;col -b -x | \
|
export MANPAGER='nvim +Man!'
|
||||||
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>' -\""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Config =============================================================
|
# Config =============================================================
|
||||||
|
|
Loading…
Reference in a new issue