mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 20:54:34 +00:00
Prefer nvim as MANPAGER, if available
This commit is contained in:
parent
8db46cd6bf
commit
3036faee22
|
@ -55,11 +55,16 @@ export MYPY_CACHE_DIR="$XDG_CACHE_HOME/mypy"
|
|||
#export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
#export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
|
||||
|
||||
# Colorful man pages
|
||||
# If bat is installed, use it as manpager
|
||||
# Colorful man pages!
|
||||
# Use neovim to open man pages
|
||||
# shellcheck disable=SC2155
|
||||
if command -v bat > /dev/null; then
|
||||
if command -v nvim >/dev/null; then
|
||||
export MANPAGER="nvim +Man!"
|
||||
# If neovim isn't installed, but bat is, use it as a manpager
|
||||
# (has color support)
|
||||
elif command -v bat >/dev/null; then
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
# Export color definitions for less (default manpager) otherwise
|
||||
else
|
||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
||||
|
|
Loading…
Reference in a new issue