On 2006-04-14, Sorav Bansal <[EMAIL PROTECTED]> wrote:
> This is a basic question, but I still could not figure out how to do it:
>
> I am unable to get colors for my vim editor on some of the cluster
> machines in my university. Vim is using underlining and bold-font to
> highlight language keywords and comments. How can I get vim to use
> colors instead of underlining and bold-font.
Just a quick check-list:
1. Your terminal emulator must support color.
- Does the terminal show colors for other applications?
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?
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.
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.)
Problems 3 and 4 can be worked around by following the instructions
in ":help xterm-color".
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA