diff --git a/vimrc b/vimrc index 039d332..f075066 100644 --- a/vimrc +++ b/vimrc @@ -22,17 +22,9 @@ set sidescroll=1 " disable bell set noerrorbells visualbell t_vb= -" 256 colours at almost all times as well as cursor shape changes -" Relies on tmux, fails spectacularly with screen! +" 256 colours at almost all times if $TERM =~ '^[xterm|rxvt-unicode|screen]' let &t_Co=256 - if $TERM =~ '^screen' && v:version >= 700 - let &t_SI = "\Ptmux;\\e[6 q\\\" - let &t_EI = "\Ptmux;\\e[4 q\\\" - else - let &t_SI = "\[6 q" - let &t_EI = "\[4 q" - endif endif if $LANG =~ '[UTF\-8|utf8]$' set termencoding=utf-8 @@ -74,6 +66,15 @@ if v:version >= 700 nnoremap n :setlocal number! nnoremap l :setlocal list! + " Cursor shape changes relies on tmux, fails spectacularly with screen! + if $TERM =~ '^screen' + let &t_SI = "\Ptmux;\\e[6 q\\\" + let &t_EI = "\Ptmux;\\e[4 q\\\" + else + let &t_SI = "\[6 q" + let &t_EI = "\[4 q" + endif + " enable case indentation let g:sh_indent_case_labels=1