Thursday, April 28, 2011

Re: syntax highlighting colors bold text

Sorry for so many mails in quick succession!

> :verbose set background?

Yep; looking at the source code, it looks like the 'background' and
't_Co' options are to blame.

And it looks like 'background' in this case must come from $COLORFGBG
(since $TERM/'term' (T_NAME) is already known to be the same):

if (STRCMP(T_NAME, "linux") == 0
|| STRCMP(T_NAME, "screen.linux") == 0
|| STRCMP(T_NAME, "cygwin") == 0
|| STRCMP(T_NAME, "putty") == 0
|| ((p = mch_getenv((char_u *)"COLORFGBG")) != NULL
&& (p = vim_strrchr(p, ';')) != NULL
&& ((p[1] >= '0' && p[1] <= '6') || p[1] == '8')
&& p[2] == NUL))
return (char_u *)"dark";
return (char_u *)"light";

So, I guess deal with $COLORFGBG or put :set background=dark or :set
background=light in your .vimrc and you should get you consistent results.

The defaults actually use 'Light' colours, when available, but on an 8
colour terminal, these are made bold instead. So, setting t_Co to 16 (or
88 or 256) would give different results (i.e. different colours, rather
than bold, if your terminal can actually handle more than 8 colours,
which it almost certainly can!).

Let's know how it goes!

Ben.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment