Saturday, May 11, 2019

Re: A question about highlight-cterm

On 11 May 2019, at 13:10, Bram Moolenaar <Bram@moolenaar.net> wrote:


I am a bit puzzled by the note in `:help highlight-cterm`:

   Note: Many terminals (e.g., DOS console) can't mix these attributes with
   coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=".

Virtually all colorschemes I have seen use ctermfg AND ctermbg AND cterm.

The note above is also at odds with `:help cterm-colors`, which states:

   If you want to set the bold attribute in a different way, put a "cterm="
   argument AFTER the "ctermfg=" or "ctermbg=" argument.

Which implies that cterm and ctermfg/ctermbg can coexist.

Perhaps, the above note is a thing of the past and should be removed?

It is not of the past, the basic ANSI terminal still only has 8 or 16
colors.

I have never encountered an issue using ctermfg and ctermbg (and cterm) in the
same definition, even with as few as eight colors, provided that the values are
in the 0-7 range. Perhaps it is because I am mostly working with xterm, or
I haven't looked hard enough. I am curious which terminals one might use in
Unix/Linux/macOS land to experiment with terminal emulators' weirdness.

Looking at the colorschemes distributed with Vim, it seems that the "xor rule"
of highlight-cterm is not honored. I guess that they are portable enough
nonetheless.

Anyway, thank you both for the feedback!
Life.

No comments:

Post a Comment