Closed mnacamura closed 7 years ago
Hi @mnacamura, I have investigated this and this is related to the way Vim works when you set the ctermbg
for the Normal highlight.
Vim "automatically" determines the best background. The colours for vim-one are approximated and somehow, even though the terminal background for Normal
is approximated to 16
(dark colour), Vim switches to light
.
So IMO, this is not a bug related to the colorscheme itself but more to the way Vim determines the background "automagically".
You can see this behaviour by selecting any colorscheme and type the following command:
:hi Normal ctermbg=16 | echom &bg
Hi @rakr, thank you for your detailed explanation. I didn't know that vim does such magic. I agree that this is an issue of vim itself rather than that of colorscheme. This issue could be closed.
Personally I do not use vim without gui color, so I decided to turn off cterm support to avoid this issue: https://github.com/mnacamura/vim-one/commit/2a18b49f49debf133d552c35f2edf7ebfb7d8829
Is there is any way to fix this issue in the main repo? it is very annoying, especially when using something like Goyo https://github.com/junegunn/goyo.vim. On exit it always resets to Light
Somehow loading vim-one, specifically executing
hi Normal ...
inside the script, resets background light even if I set it dark.Below I describe the method to reproduce this problem.
Reprodcution
NeoVim version
Minimal configuration
In
init.vim
, I put the following:Then I added some debug messages to
color/one.vim
:Output