Saturday, April 22, 2023

Re: Unexpected cterm-colors in Windows

On Fri, 21 Apr 2023 23:54:44 -0700 (PDT)
Romain Lafourcade <romainlafourcade@gmail.com> wrote:
> > Another thing: what does NR-16 and NR-8 mean? I can't find these terms
> > on the internet. Every hit I get is in the context of Vim.
>
> They are explained a few lines below the block you cited.
>
> Vim is not very good at detecting terminal features in general and it is
> pretty bad with colors so you should probably notch down your expectations
> regarding syntax highlighting.
>
> Basically, if you stop at that table you would _think_ that 1 and DarkBlue
> should be interchangeable when &t_Co == 16, while they are very different
> when testing it in your terminal emulator.
> There is a very short explanation a few paragraphs below the table:
>
> > Note that for 16 color ansi style terminals (including xterms), the
> > numbers in the NR-8 column is used. Here '*' means 'add 8' so that
> > Blue is 12, DarkGray is 8 etc.
>
> That explanation is frustrating, though, because most terminal emulators in
> use nowadays fall into that broad "color ansi style terminals (including
> xterms)" category... which is still treated ("brushed off", even) as a
> special case.
> This makes the table and most of the text below it unnecessarily confusing.

Thanks for the explanation. It's clear to me now, or close enough.

For completion's sake: I dug into this issue because I saw cterm-colors
were different in my Windows terminals (both xterm-like Windows Terminal
_and_ old Conhost terminal) than in Ubuntu suckless/Gnome terminals
(both xterm-like). I guess Vim doesn't consider Windows terminals as
xterm-like.

I recently switched from using 256-colors to 16-colors on my Ubuntu
machine (because Vim colors would then correspond to the terminal
emulator colors: I'll need to change only terminal emulator colors).
When I pulled my config changes to my Windows computer, the colors were
different.

--
Enan

--
--
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/20230422222712.00003d41%40gmail.com.

No comments:

Post a Comment