Detect 256-color capable 'screen', enable mouse support too

Thu, 31 Jul 2014 12:19:53 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 31 Jul 2014 12:19:53 -0400
changeset 122
dff13372e830
parent 120
3a676c8eaafe
child 123
52145be176c2
child 124
1be15444e144

Detect 256-color capable 'screen', enable mouse support too

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -382,14 +382,25 @@ if has('gui_running')
 
   colorscheme solarized
 else
-  if &t_Co == 256
-    colorscheme jellybeans
-  end
+
+  if $TERM =~ 'screen'
+    if $TERM == 'screen-bce'
+      "if i'm not screen-bce, i'm not sure i have a good .screenrc in place
+      set t_Co=256
+    endif
+
+    set mouse=a
+  endif
 
   if $TERM =~ 'rxvt-unicode'
     set ttymouse=urxvt
     set mouse=a
   endif
+
+  if &t_Co == 256
+    colorscheme jellybeans
+  end
+
 end
 
 

mercurial