From 2bc1b356e325ca053afb7c32d123703de747f143 Mon Sep 17 00:00:00 2001 From: Von Random Date: Tue, 30 Jun 2015 00:48:12 +0300 Subject: [PATCH] fixed regex (VimL is fugly) --- vimrc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index 995c760..69956fd 100644 --- a/vimrc +++ b/vimrc @@ -22,13 +22,18 @@ set sidescroll=1 " disable bell set noerrorbells visualbell t_vb= -" enforce 256 colours for ssh connections and VTE -if $TERM =~ '^xterm' || $TERM =~ '^rxvt-unicode' || $TERM =~ '^screen' +" 256 colours at almost all times as well as cursor shape changes +" Relies on tmux, fails spectacularly with screen! +if $TERM =~ '^[xterm|rxvt-unicode]' + let &t_Co=256 let &t_SI .= "\[6 q" let &t_EI .= "\[4 q" +elseif $TERM =~ '^screen' let &t_Co=256 + let &t_SI = "\Ptmux;\\e[6 q\\\" + let &t_EI = "\Ptmux;\\e[4 q\\\" endif -if $LANG =~ 'UTF-8$' || $LANG =~ 'utf8$' +if $LANG =~ '[UTF\-8|utf8]$' set termencoding=utf-8 set encoding=utf-8 endif