From a521012dec2f8c8448e29696f16fc3c99a3b2393 Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 3 Sep 2015 19:19:10 +0300 Subject: [PATCH] yes, this will do --- vimrc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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