Re: colors in vim

2006-04-14 Thread Sorav Bansal
>
> Did you use a real escape character as noted just below the "endif"
> in that :help entry, or did you use the five characters ""?

Great! It worked! Thanks a ton!

Sorav


Re: colors in vim

2006-04-14 Thread Gary Johnson
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=[3%p1%dm" in my vimrc file, but instead
> of showing colors, it appends these characters to the keywords. For
> example: [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 ""?

HTH,
Gary

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


Re: colors in vim

2006-04-14 Thread Sorav Bansal
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.

> 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=[3%p1%dm" in my vimrc file, but instead
of showing colors, it appends these characters to the keywords. For
example: [32mvoid

thanks for your help again!
Sorav


Re: colors in vim

2006-04-14 Thread Gary Johnson
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


colors in vim

2006-04-14 Thread Sorav Bansal
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.

thanks in advance!
Sorav