From 06ed58afd8fb86338717b34102c44ed10a5d59d2 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 28 Sep 2024 18:01:45 +0800 Subject: change(man): made man page default to less --- env.zsh | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/env.zsh b/env.zsh index f047392..128abd7 100755 --- a/env.zsh +++ b/env.zsh @@ -34,20 +34,32 @@ export XDG_PICTURES_DIR="$HOME/Pictures" export XDG_VIDEOS_DIR="$HOME/Videos" ## Comment this to use normal manpager -export MANPAGER='lvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0" +"set showtabline=0" +"set nonumber"' +# export MANPAGER='lvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0" +"set showtabline=0" +"set nonumber"' -if [ $(echo $MANPAGER | awk '{print $1}') = nvim ]; then - export LESS="--RAW-CONTROL-CHARS" - # export MANPAGER="less -s -M +Gg" +# if [ $(echo $MANPAGER | awk '{print $1}') = nvim ]; then +# export LESS="--RAW-CONTROL-CHARS" +# # export MANPAGER="less -s -M +Gg" + +# export LESS_TERMCAP_mb=$'\e[1;32m' +# export LESS_TERMCAP_md=$'\e[1;32m' +# export LESS_TERMCAP_me=$'\e[0m' +# export LESS_TERMCAP_se=$'\e[0m' +# export LESS_TERMCAP_so=$'\e[01;33m' +# export LESS_TERMCAP_ue=$'\e[0m' +# export LESS_TERMCAP_us=$'\e[1;4;31m' +# fi + +# less source highlight +# export LESS_TERMCAP_mb=$'\E[1;31m' +# export LESS_TERMCAP_md=$'\E[1;36m' +# export LESS_TERMCAP_me=$'\E[0m' +# export LESS_TERMCAP_se=$'\E[0m' +# export LESS_TERMCAP_so=$'\E[01;44;33m' +# export LESS_TERMCAP_ue=$'\E[0m' +# export LESS_TERMCAP_us=$'\E[1;32m' +export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s" +export LESS='-R ' - export LESS_TERMCAP_mb=$'\e[1;32m' - export LESS_TERMCAP_md=$'\e[1;32m' - export LESS_TERMCAP_me=$'\e[0m' - export LESS_TERMCAP_se=$'\e[0m' - export LESS_TERMCAP_so=$'\e[01;33m' - export LESS_TERMCAP_ue=$'\e[0m' - export LESS_TERMCAP_us=$'\e[1;4;31m' -fi # bitwarden export BW_SESSION="u1DcDFJAlhlceXLpmjVud3X8vq6ECrXiHN4uBohIQJHohWFHxEmWqTYVyEqV1Taoas8RMPoZuObBZglkK6Z+pw==" -- cgit v1.2.3