<quote name="Michael Torrie" date="Mon, 3 Mar 2008 at 20:50 -0700"> > This afternoon a coworker who used vim in a terminal heavily complained > that he hated the 16-color schemes that vim used. So we converted him > to gvim in order to get him better color schemes like Hans' desert > scheme. Along the way, I thought, surely terminal emulators in this day > and age support more than 16 colors. Sure enough they do. I discovered > this page, which I will share with you: > > http://www.frexx.de/xterm-256-notes/
Very cool, I never even thought to wonder if terminals could do more colors. > Apparently gnome-terminal and konsole both should work fine with 256 > colors (in any modern distro anyway). There is even a link there to a > desert256 color scheme! After trying it out, I couldn't get it to work. > I have to manually tell vim about the colors: > > :set t_Co=256 > Then it works. The color scheme itself is smart enough to check the > colors, but vim apparently doesn't detect that 256 colors are available, > so it never sets the variable. Hence the scheme doesn't run. Can any > one tell me a better way in my vimrc to really detect it, say I'm > running with TERM set to "xterm" and then force it to 256 colors? And > if someone wants to help me hack the desert256.vim file to set the > background to grey instead of black, that'd be cool too! My vimrc-foo > is pretty weak. Turns out xterm supports 256 color, but doesn't advertise that it does. So anything that tries to determine if 256 will work will think xterm doesn't. Answer, set your TERM=xterm-256color, perhaps only on the condition that it was xterm to start with. You also need the term definitions for xterm-256color. In debian, this comes in the ncurses-term package. > Michael, who is busily recompiling elinks to take advantage of 256 colors! Well I have 256 colors in mutt :p This is how I found out about xterm not advertising. A mutt mailing list suggested the following to use a 256 color scheme only if you could actually use it. source color.`tput colors`.muttrc tput colors should say 256 if your terminal is cool, or 8 otherwise. Some might say 16, who knows. xterm will also say 256 if you set it to xterm-256color as outlined above. Creating a 256 color scheme is tedious, so I've included mine for all to play with. Von Fugal -- Freedom is Popular http://www.ronpaul2008.com
# intended for a dark bg color normal color252 color233 color quoted color24 color233 color signature color126 color233 color indicator brightcolor48 color233 color error red color233 color status color42 color237 color tree color48 color233 # the thread tree in the index menu color tilde color245 color233 color message yellow color233 color markers yellow color233 color attachment color221 color233 color search color48 color240 # how to hilite search patterns in the pager color hdrdefault color238 color233 color header color243 color233 "^(Date|From|Subject)" color header color73 color233 "^(|To|Reply-To):" color header color245 color233 "^(X-Original-To):" color header color96 color233 "^(User-Agent|X-Editor):" color body blue color233 "(ftp|http)://\w[^ ]+[^.]" # point out URLs color body color128 color233 '[EMAIL PROTECTED]' # e-mail addresses color underline brightgreen color233 color index brightcolor220 color233 ~N # New color index color220 color233 ~O # Old color index color91 color233 ~T # tagged color index color238 color233 ~D # Deleted color index cyan color233 ~F # Flagged
signature.asc
Description: Digital signature
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */