ssh-compat as a function in zshrc; also more compatible vimrc for linux tty
This commit is contained in:
parent
503f941810
commit
83b95408ba
2 changed files with 20 additions and 6 deletions
8
vimrc
8
vimrc
|
@ -70,9 +70,11 @@ if v:version >= 800
|
||||||
autocmd FileType python packadd ale
|
autocmd FileType python packadd ale
|
||||||
autocmd FileType sh packadd ale
|
autocmd FileType sh packadd ale
|
||||||
|
|
||||||
let g:solarized_extra_hi_groups = 1
|
if $TERM != 'linux'
|
||||||
let g:solarized_use16 = 1
|
let g:solarized_extra_hi_groups = 1
|
||||||
colorscheme solarized8
|
let g:solarized_use16 = 1
|
||||||
|
colorscheme solarized8
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
|
|
18
zshrc
18
zshrc
|
@ -228,9 +228,21 @@ greset() {
|
||||||
/usr/bin/git clean -fd
|
/usr/bin/git clean -fd
|
||||||
/usr/bin/git reset --hard
|
/usr/bin/git reset --hard
|
||||||
}
|
}
|
||||||
|
# ssh-compat, when terminfo is missing
|
||||||
|
s() {
|
||||||
|
local -A terms tempterm ssh
|
||||||
|
ssh=$(whence ssh)
|
||||||
|
terms=(
|
||||||
|
'st' 'xterm'
|
||||||
|
'tmux' 'screen'
|
||||||
|
)
|
||||||
|
tempterm=${TERM%%-256color}
|
||||||
|
TERM=${TERMS[$tempterm]-$tempterm} $ssh "$@"
|
||||||
|
}
|
||||||
|
# prefer neovim over vim
|
||||||
vim() {
|
vim() {
|
||||||
local vimbin
|
local vim
|
||||||
vimbin=$(whence nvim) || vimbin=$(whence vim)
|
vim=$(whence nvim) || vimbin=$(whence vim)
|
||||||
$vimbin "$@"
|
$vim "$@"
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue