1
0
Fork 0

tvim support, cleanup and better s() func

This commit is contained in:
Von Random 2018-07-06 00:33:07 +03:00
parent b992f92516
commit 6b4fe587cd
3 changed files with 14 additions and 14 deletions

View file

@ -9,7 +9,7 @@ bind > resize-pane -R 5
bind - resize-pane -D 5 bind - resize-pane -D 5
bind + resize-pane -U 5 bind + resize-pane -U 5
bind e choose-session bind e choose-session
bind p command-prompt -p "ssh:" "new-session -As 'ssh'; new-window -n '%1' 'TERM=screen ssh %%'" bind p command-prompt -p "ssh:" "new-session -As 'ssh'; new-window -n '%1' 'TERM=screen-256color ssh %%'"
bind t command-prompt -p "attach pane to:" "join-pane -t :'%%'" bind t command-prompt -p "attach pane to:" "join-pane -t :'%%'"
bind y command-prompt break-pane bind y command-prompt break-pane
bind -n M-w next-window bind -n M-w next-window

14
vimrc
View file

@ -16,11 +16,13 @@ set t_Co=256 t_ut= termencoding=utf-8 encoding=utf-8
set wildmenu showcmd ruler laststatus=2 set wildmenu showcmd ruler laststatus=2
set statusline=[%F]\ %R%H%W%M\ %=[%{&fenc}/%{&ff}]\ %y\ [%4l/%L:%3v] set statusline=[%F]\ %R%H%W%M\ %=[%{&fenc}/%{&ff}]\ %y\ [%4l/%L:%3v]
" update window title " update window title
if $TERM =~ '^screen' if !exists('g:tvim')
if $TERM =~ '^screen'
set t_ts=k set t_ts=k
set t_fs=\ set t_fs=\
endif
set title titlestring=[%{hostname()}]\ %t\ -\ vim
endif endif
set title titlestring=[%{hostname()}]\ %t\ -\ vim
" enable case indentation " enable case indentation
let g:sh_indent_case_labels=1 let g:sh_indent_case_labels=1
" version specific settings " version specific settings
@ -34,11 +36,7 @@ map <Space> <NOP>
let mapleader="\<Space>" let mapleader="\<Space>"
"no more F1 "no more F1
noremap <F1> <Esc> noremap <F1> <Esc>
xnoremap <F1> <Esc>
snoremap <F1> <Esc>
inoremap <F1> <Esc>
lnoremap <F1> <Esc> lnoremap <F1> <Esc>
cnoremap <F1> <Esc>
"some toggles "some toggles
nnoremap <Leader>l :setlocal list!<CR> nnoremap <Leader>l :setlocal list!<CR>
nnoremap <Leader>c :setlocal cursorline!<CR> nnoremap <Leader>c :setlocal cursorline!<CR>
@ -70,7 +68,9 @@ if v:version >= 800
autocmd FileType python packadd ale | packadd jedi-vim autocmd FileType python packadd ale | packadd jedi-vim
autocmd FileType sh packadd ale autocmd FileType sh packadd ale
if $TERM != 'linux' if exists('g:tvim') || has('gui_running')
colorscheme jellybeans
elseif $TERM != 'linux'
let g:solarized_extra_hi_groups = 1 let g:solarized_extra_hi_groups = 1
let g:solarized_use16 = 1 let g:solarized_use16 = 1
colorscheme solarized8 colorscheme solarized8

8
zshrc
View file

@ -236,10 +236,10 @@ s() {
local -A terms tempterm ssh local -A terms tempterm ssh
ssh=$(whence ssh) ssh=$(whence ssh)
terms=( terms=(
'st' 'xterm' 'rxvt-unicode-256color' 'rxvt-unicode'
'tmux' 'screen' 'st-256color' 'xterm-256color'
'tmux-256color' 'screen-256color'
) )
tempterm=${TERM%%-256color} TERM=${terms[$TERM]-$TERM} $ssh "$@"
TERM=${TERMS[$tempterm]-$tempterm} $ssh "$@"
} }
# }}} # }}}