Closed jonsmithers closed 6 years ago
s:dark
only gets declared if one of these conditions is met:
if has('gui_running') || &t_Co == 88 || &t_Co == 256
For me, &t_Co
is 8
(only in iTerm). And I'm running inside a terminal.
Adding set t_Co=256
in the minimal vimrc gets it to work.
This is traditionally how I get all my colors:
if (has('termguicolors'))
set termguicolors
else
set t_Co=256
endif
Maybe that's the wrong way of doing it. Maybe I should be doing this:
set t_Co=256
if (has('termguicolors'))
set termguicolors
endif
(EDIT) maybe not? I think termguicolors alone should get you true color, as if has('gui_running')
were true.
I get this with Mac Terminal as well
colorscheme one let g:one_allow_italics = 1 set background=dark
Error detected while processing /Users/{user}/.vim/plugged/vim-one/colors/one.vim: line 840: E121: Undefined variable: s:dark E15: Invalid expression: s:dark E121: Undefined variable: s:dark E15: Invalid expression: s:dark E121: Undefined variable: s:dark E15: Invalid expression: s:dark
Same here with Mate Terminal 1.18.2 @jonsmithers solution works for me
I'm getting this error when switching to the colorscheme:
Here is a minimal vimrc I've been using to test this:
It doesn't happen in Terminal, only iTerm. I tried creating a brand new iTerm profile so everything was default but the error persists.