add suuport for bat as man reader

This commit is contained in:
psox 2021-12-22 14:17:52 +00:00
parent 091de18feb
commit c434926442
2 changed files with 7 additions and 6 deletions

6
vimrc
View File

@ -215,7 +215,7 @@ if has_key(plugs, 'vim-qf')
let g:qf_auto_resize = 0 let g:qf_auto_resize = 0
endif endif
endif endif
" ripgrep settings " ripgrep settings
let g:rg_highlight = 'true' let g:rg_highlight = 'true'
let g:rg_derive_root = 'true' let g:rg_derive_root = 'true'
@ -230,7 +230,7 @@ let g:rainbow_active = 1
augroup PsoxFileAutos augroup PsoxFileAutos
autocmd! autocmd!
autocmd FileType yaml setlocal indentkeys-=<:> ts=8 sts=2 sw=2 expandtab autocmd FileType yaml setlocal indentkeys-=<:> ts=8 sts=2 sw=2 expandtab
autocmd FileType go setlocal ts=8 sts=4 sw=4 noexpandtab autocmd FileType go setlocal ts=8 sts=4 sw=4 noexpandtab
\| autocmd BufWritePre <buffer> silent :call CocAction('format') \| autocmd BufWritePre <buffer> silent :call CocAction('format')
" Tidy nerdtree windiw " Tidy nerdtree windiw
autocmd FileType nerdtree setlocal nocursorcolumn nonumber norelativenumber signcolumn=no autocmd FileType nerdtree setlocal nocursorcolumn nonumber norelativenumber signcolumn=no
@ -378,7 +378,7 @@ if has_key(plugs, 'fzf.vim')
nnoremap <silent> <A-S-f> :Files<CR> nnoremap <silent> <A-S-f> :Files<CR>
nnoremap <silent> <leader><A-S-f> :Files!<CR> nnoremap <silent> <leader><A-S-f> :Files!<CR>
nnoremap <A-b> :Buffers nnoremap <A-b> :Buffers
nnoremap <leader><A-b> :Buffers! nnoremap <leader><A-b> :Buffers!
nnoremap <silent> <A-S-b> :Buffers<CR> nnoremap <silent> <A-S-b> :Buffers<CR>
nnoremap <silent> <leader><A-S-b> :Buffers!<CR> nnoremap <silent> <leader><A-S-b> :Buffers!<CR>

7
zshrc
View File

@ -31,7 +31,7 @@ path=( /bin /sbin /usr/bin /usr/sbin $path )
# Set funtion paths # Set funtion paths
foreach local p in ~/.local/share/zsh/functions ~/.config/zsh/functions $extra_fpath foreach local p in ~/.local/share/zsh/functions ~/.config/zsh/functions $extra_fpath
[[ -d "$p" ]] && fpath=( "$p" $fpath ) [[ -d "$p" ]] && fpath=( "$p" $fpath )
end end
[[ "$OS" != "Windows_NT" ]] && [[ -f /etc/profile ]] && source /etc/profile [[ "$OS" != "Windows_NT" ]] && [[ -f /etc/profile ]] && source /etc/profile
@ -105,7 +105,7 @@ plugins=(
( [[ "$(uname)" == "Darwin" ]] ) && plugins+=( osx ) ( [[ "$(uname)" == "Darwin" ]] ) && plugins+=( osx )
#( which vim &>/dev/null ) && plugins+=( vim-interaction ) #( which vim &>/dev/null ) && plugins+=( vim-interaction )
( which ssh &>/dev/null ) && [[ -d ~/.ssh ]] && plugins+=( ssh-agent ) ( which ssh &>/dev/null ) && [[ -d ~/.ssh ]] && plugins+=( ssh-agent )
plugins+=( plugins+=(
zsh-completions zsh-completions
zsh-autosuggestions zsh-autosuggestions
zsh-navigation-tools zsh-navigation-tools
@ -128,7 +128,7 @@ fi
if [[ -d ~/.ssh ]] if [[ -d ~/.ssh ]]
then then
zstyle :omz:plugins:ssh-agent lifetime 36h zstyle :omz:plugins:ssh-agent lifetime 36h
if [[ -e ~/.ssh/autoload ]] if [[ -e ~/.ssh/autoload ]]
then then
zstyle :omz:plugins:ssh-agent identities $( cat ~/.ssh/autoload ) zstyle :omz:plugins:ssh-agent identities $( cat ~/.ssh/autoload )
fi fi
@ -189,6 +189,7 @@ which nvim >/dev/null 2>&1 && alias vim="$(which nvim)"
alias v=vim alias v=vim
[[ -x /usr/bin/yay ]] && [[ "$(whoami)" != "pacman" ]] && alias yay='sudo -iupacman /usr/bin/yay' [[ -x /usr/bin/yay ]] && [[ "$(whoami)" != "pacman" ]] && alias yay='sudo -iupacman /usr/bin/yay'
[[ -x /usr/bin/paru ]] && [[ "$(whoami)" != "pacman" ]] && alias paru='sudo -iupacman /usr/bin/paru' [[ -x /usr/bin/paru ]] && [[ "$(whoami)" != "pacman" ]] && alias paru='sudo -iupacman /usr/bin/paru'
[[ -x /usr/bin/bat ]] && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
typeset -A key typeset -A key