cvs commit: LFS/BOOK/chapter06 chapter06.xml vim.xml

Alexander E. Patrakov see at the.sig
Thu Jun 10 23:33:31 PDT 2004

Jeremy Utley wrote:
> Alexander E. Patrakov said:
>>So background=dark is wrong for xterm, background=light is wrong for
>>Linux console, no background at all is right for both. For details, see
>>vim62/src/option.c, between lines 2937 and 2956.

That were in vim 6.2. For 6.3, the block starts at line 2984.

> No, background=dark is NOT wrong for xterm, *IF* that term is configured
> with a dark background.

I agree :) But the default for xterm is the light background

>>Probably you use an initrd and forgot to apply the "proclen" patch to
>>sysvinit. Without this patch, sysvinit clobbers the value of the TERM
> Nope, no initrd.
>>I will not revert the change until you provide the following information:
>>1) what echo $TERM says on your Linux console
> linux


>>4) post your /etc/vimrc and ~/.vimrc files if they contain something
>>except options in the book and a command to set the background.
> strictly by the book, with the exception of set background=dark.
> As I said, without this, the hilight color used for comments is a very
> dark blue (at least on my systems) and is nearly unreadable.  With this
> setting, the comments are a light-blue, and are MUCH easier read.

The comments are light-blue on linux console and dark-blue in xterm here 
without the background option

> And by the way, since you're new here, it's usually considered bad form to
> arbitrarily undo another editor's changes to the book without at least
> SOME discussion.  Especially when that change was pre-approved by the
> project coordinator.

The discussion was started on lfs-book after your commit of this option, 
04/05/23 14:18:34. Tushar expressed his opinion: "Are you sure this is 
needed?" Then there was some discussion of the setup on belgarth. Then 
James Iwanek confirmed your viewpoint. Nico R mentioned that this may 
depend on $TERM. The analysis of the vim source code reveals that it is 
indeed the case. The last mail in that thread was by Tushar: "See, you 
learn something new everyday:)". I interpreted that as a sign that the 
change was bogus. Do you mean some other discussion?

Sorry anyway. I reread the source code once again and... I cannot 
believe you. There must be some difference between our systems, that 
still has to be found.

Could you please add after line 2984 in src/option.c (that reads
#if !((defined(MSDOS)... )
#error A. E. Patrakov is right

and try to recompile vim? On my computer, the debugging "#error" 
statement popped up. I specifically state that this is also reproducible 
on a virtual machine in VMware with no X installed.

Of course I can just revert the change of the background option, but I 
think that it would be better to write something like:

if ($TERM == "linux") || ($TERM == "iterm")
   set background=dark

(iterm is one more terminal with a dark default background).

What do you think about that change?

Of course, this change makes sense for me only if we agree upon the 
background option being necesary at all.

Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .

More information about the lfs-book mailing list