Bugzilla – Bug 1641
xterm terminfo entry doesn't support color
Last modified: 2009-10-02 10:46:16 UTC
You need to log in before you can comment on or make changes to this bug.
I found vim doesn't have color after ":syntax on". but if export TERM=xtermc, the color is back. aubrey@Indiana:~/cpupm-gate$ echo $TERM xterm
Actually, please configure VIM with 1) --with-tlib=curses to enable color 2) --enable-cscope to enable cscope option Otherwise, developers will get vim from blastwave, :-) Thanks, -Aubrey
vim *is* compiled with cscope support. As for color support, no properly written curses program will display color unless your TERM setting points to a terminfo entry that tells the program that color is available, and the xterm terminfo entry says it's black and white. vim is doing precisely the right thing. You need to set $TERM to a terminfo entry that supports color, such as xtermc. The argument could be made that your terminal emulator (xterm, gnome-terminal, whatever) should set $TERM for you to the maximally capable terminfo entry, but vim has nothing to do with that.
I'm not terminal setting expert. But, if I grab vim from blastwave, the color is enabled, without TERM=xtermc setting. when you use any linux distro, the color is enabled, without TERM=xtermc setting.
The curses implementation on Linux is ncurses. The vim distributed by blastwave is linked to ncurses, too, not the system curses. In both cases, ncurses comes with terminfo entries that give xterm eight colors. Thus vim will run in color in those cases. I suppose it'd be possible to change the terminfo entry for xterm on base solaris to support color, but this is definitely not a vim bug, or even rfe.
Danek, As to your comment about gnome-terminal/xterm vs. xtermc $TERM, are there plans to have gnome-terminal use xtermc as the default $TERM setting? If it'll make things work "out of the box" with colors for users, so they have the expected functionality they are (likely) used to in Linux (making the assumption they are trying OSOL w/ a background in Linux), it seems to me it might be prudent. Additionally, as I don't imagine many people run gnome-terminal on b&w/greyscale systems, it likely should, by default, advertise itself as color capable. Does this need another filing to suggest, or will this be sufficient? Cheers, David
I've no idea about the plans for gnome-terminal. It seems a reasonable idea to me to make it use a color-capable $TERM by default, but I'll bet that GNOME upstream doesn't care much, since TERM=xterm on Linux has color by default. So we either have to patch gnome-terminal specially, or replace our xterm terminfo entry with a more modern one. I've copied Laca for comment, in case he has anything helpful to add. I'll point our curses folks at this bug, too, to see if they have anything to add.
Since both xterm and gnome-terminal support colours, (and also Xfce's Terminal and KDE's) I think it would make more sense to enhance the xterm terminfo than to patch each of those terminal emulators.
It looks like using TERM=xtermc only gives support for a few colors, as using my typical .vimrc, syntax highlighting is horrific. I like the idea of replacing the 'xterm' terminfo with something more modern, so things work out of the box. In the meantime, is there a TERM we can use, that will support more colors than xtermc?
Correction, TERM=xtermc is giving me full color capability with vim, I had a setting from my previous desktop that got inadvertently migrated over in my .vimrc.
(In reply to comment #9) > Correction, TERM=xtermc is giving me full color capability with vim, I had a > setting from my previous desktop that got inadvertently migrated over in my > .vimrc. From this comment, if I've reading (and understanding this bug correctly), then there isn't a bug left here to fix. If someone (Audrey or David) can confirm, it can be closed out as WORKSFORME. Thanks.
Since familiarization is a big goal for Solaris.Next, I believe this issue should be fixed. People expect working colors by default, and they do work for applications like joe or GNU ls on OpenSolaris with TERM set to xterm.