jeffkreeftmeijer / vim-dim

Dim (/dɪm/; a contraction of Default IMproved) is a clone of Vim’s default colorscheme, with some improvements.

Home Page:https://jeffkreeftmeijer.com/vim-16-color

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is 8 colors terminal supported by dim?

shunlir opened this issue · comments

The color scheme is using 16 color number, taking a highlight group from the source:

" Highlight search matches in black, with a yellow background
highlight Search         ctermfg=0    ctermbg=11

the background color is not showing correctly for 8 colors terminal:
image
After changing 11 to 3*, it looks good:
image

I did a few investigation, dim only works when t_Co>=16.
Do you know is there any working color fallback method supported by VIM can be used?
I tried colors in :h cterm-color, but no one is perfect:

  • using color name has good fall back from 16 to 8 colors, e.g. LightYellow means 3 when t_Co==8, 11 when t_Co==16, but for 256 color terminal, the color number is 229
  • using 3* doesn't change to 11 when t_Co is 16 or 256, seems a bug of VIM? (this works for neovim)

Hey @shunlir, sorry for taking so long to get back to you on this. I’m not sure what the issue is here, but are you still having this problem? I’d merge a 8-color setting if it looks okay, but I’m afraid I don’t have time to look into that myself.