On 2006-04-14, Sorav Bansal <[EMAIL PROTECTED]> wrote:
> Thanks for the quick help. Here are the answers to the checklist:
> 
> > 1.  Your terminal emulator must support color.
> >     -   Does the terminal show colors for other applications?
> Yes, it shows colors for 'ls -- color'
> 
> > 2.  The TERM environment variable must be set to the type of
> >     terminal emulator you are using.
> >     -   From a shell prompt, what does
> >             echo $TERM
> >         show?
> $TERM = xterm
> 
> > 3.  The terminfo database for $TERM must be correct and must
> >     indicate that the terminal supports color.
> >     -   From a shell prompt, if you execute
> >             infocmp
> >         or
> >             untic
> >         (depending on your flavor of Unix) you should see some
> >         cryptic looking stuff including "colors#8," "colors#16," or
> >         "colors#256" in the second or third line.  If you don't,
> >         then your terminfo database is telling vim that your
> >         terminal doesn't support color.
> 
> I don't see any 'colors#' in my infocmp output. This seems to be a problem.

The terminfo database is usually found in /usr/lib/terminfo or 
/usr/share/lib/terminfo.  If you do an 'ls' in the 'x' subdirectory, 
you'll see the available xterm terminal types.  If you see 
"xterm-color" or "xterm-16color" there, try setting TERM to one of 
those names and try vim again.

> 
> > 4.  Vim must be built with a termlib that supports color.
> >     -   From withing vim, execute
> >             :set termcap
> >         and look for the "t_Co=" value.  It should be the same as
> >         the "colors#" from the terminfo database.  If the entry is
> >         empty or 0, then your termlib may be broken and you may need
> >         to recompile vim (if you can) with a different termlib.
> >         (HP-UX 10.20 has this problem.)
> 
> t_Co is blank.
> 
> 
> > Problems 3 and 4 can be worked around by following the instructions
> > in ":help xterm-color".
> 
> I tried using "set t_Sf=<Esc>[3%p1%dm" in my vimrc file, but instead
> of showing colors, it appends these characters to the keywords. For
> example: <Esc>[32mvoid

Did you use a real escape character as noted just below the "endif" 
in that :help entry, or did you use the five characters "<Esc>"?

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to