Bug 1641 - xterm terminfo entry doesn't support color
: xterm terminfo entry doesn't support color
Status: CAUSEKNOWN
Product: opensolaris
software
: unspecified
: ANY/Generic OpenSolaris
: P4 minor with 1 vote (vote)
: ---
Assigned To: osol/software watcher
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-04-27 00:31 UTC by Aubrey.Li
Modified: 2009-10-02 10:46 UTC (History)
10 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Aubrey.Li 2008-04-27 00:31:27 UTC
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
Comment 1 Aubrey.Li 2008-07-20 07:03:46 UTC
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
Comment 2 Danek Duvall 2008-07-20 10:34:26 UTC
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.
Comment 3 Aubrey.Li 2008-07-20 17:25:33 UTC
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.
Comment 4 Danek Duvall 2008-07-20 18:12:47 UTC
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.
Comment 5 David J. Orman 2008-08-21 18:21:42 UTC
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
Comment 6 Danek Duvall 2008-08-23 10:05:29 UTC
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.
Comment 7 Laszlo (Laca) Peter 2008-08-23 20:23:04 UTC
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.
Comment 8 David J. Orman 2008-08-27 21:39:01 UTC
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?
Comment 9 David J. Orman 2008-09-03 04:00:12 UTC
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.
Comment 10 Rich Burridge 2009-02-13 10:08:10 UTC
(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.
Comment 11 Alexander Vlasov 2009-10-02 10:46:16 UTC
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.