Saturday, May 11, 2019

Re: A question about highlight-cterm

On Sat, May 11, 2019 at 12:04 PM 'Lifepillar' via vim_use
<vim_use@googlegroups.com> 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?
>
> Thanks,
> Life.

I believe that the confusion is due to the fact that (a) cterm=NONE;
(b) cterm=bold; (c) other values interact in three different ways
(when they do at all) with bg/fg color settings.

IIUC you can use cterm=NONE _before_ ctermbg= ctermfg= in order to
clear anything that may be present before (such as bold) but not your
own colours. It *may* be possible to add cterm=bold after a ctermfg=
color in the range 0..7; OTOH ctermfg= in the range 8..16 (on an
8-or-16-bg 16-fg terminal) usually _implies_ bold. Using both
cterm=underline and ctermfg= ctermbg= will usually not work as
expected. OTOH AFAIK ctermbg= and ctermfg= can usually be used
together provided that you don't exceed the terminal's capabilities.

Best regards,
Tony.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXsmBFgZ3YUs36U3Qu5o4c34x2PQNZJZPVh7nm7DT3HEwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment