rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.99k stars 196 forks source link

echo g:colors_name output Undefined on set background=dark #50

Closed arkenichi closed 7 years ago

arkenichi commented 7 years ago

Hi @rakr, I'm a big fan of vim one made by you.

I found something wrong with this color scheme. Somehow the color looks different from the one on the screenshot here.

Look at the colors in the NERDTree section, the colors are clearly little bit different. Differences

Somehow, if I give the command :colorscheme onedirectly then the color becomes as it should be. Work temporarily

Another thing is if I use set background = light then the color will be normal.

.vimrc
colorscheme one 
set background = dark

with this settings if i type :colorscheme, it will output colorscheme default. It should output colorscheme one right?

I did another test using :echo g:colors_name

still using the same settings

.vimrc
colorscheme one 
set background = dark

If I run the command :echo g:colors_name Output E121: Undefined variable: g:colors_name E15: Invalid expression: g:colors_name

But if I change the settings to set background = light then if I run command :colorscheme it will output. colorscheme one and run command :echo g:colors_name it will output one which is what I expected.

Video version :

Video Version

So, I think there is something wrong with vim one colorscheme and set background = dark

I apologize if my question is too stupid also my English is so bad and bother you. Thank you for the help! 😺

icearith commented 7 years ago

@rakr I got the similar issue. @wsdjeg

rakr commented 7 years ago

This is a known issue, I am still trying to figure out the best way to solve this definitely. For the moment, please make sure to call the set background command before the colorscheme one. This is related to Vim's behaviour when it sets the ctermbg for Normal highlight.

@arkenichi, there are no stupid questions, and English is not my first language either :)

arkenichi commented 7 years ago

Hi @rakr !, I have tried your solution and it works perfectly for now. Thanks for the help! 👍 😸