JP Vossen on 21 Feb 2012 00:05:21 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] GNU Screen follow-up


One other thing. Depending on your distro, the version of 'screen' you are using and various defaults, 'vim' might look *really* bad running in it. That's because screen often does not support 256 colors by default, which is really annoying.

See:
http://www.linuxquestions.org/questions/linux-software-2/gnu-screen-wont-do-256-colors-with-xterm-rxvt-mrxvt-583880/
http://www.frexx.de/xterm-256-notes/


And there's another "feature" used by 'less', 'vim,' and other tools that can mess with 'screen'. It's called (confusingly enough) the "alternate screen". See below.


This is in my ~/.screenrc:

# Turn on 256-colors (needs screen compiled with --enable-colors256)
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce "on"

# http://www.gnu.org/software/screen/manual/screen.html#Redisplay
# http://wiki.linuxquestions.org/wiki/Screen
# Support alternate screens so that, for example, when you
# quit out of vi, the display is redrawn as it was before vi
# redrew the full screen. (See also vimrc)
altscreen on


Later,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug