Closed programus closed 7 years ago
256ctermbg
is for 256-color terminals and accepts decimal color indices like 233
, not 24-bit RGB hex colors. ctermbg
is for 16-color terminals and also only accepts color indices.
Try this instead:
let g:jellybeans_overrides = {
\ 'background': { 'ctermbg': 'none', '256ctermbg': 'none' },
\ 'CursorLine': { 'guibg': '121212' },
\}
A guibg
override will apply directly to GUI Vim and termguicolors
terminals, and will be automatically converted to a color index for 256 and lower color terminals.
If you also want to set background
to none
on termguicolors
terminals, but not GUI Vim, try
let g:jellybeans_overrides = {
\ 'CursorLine': { 'guibg': '121212' },
\}
if !has('gui')
let g:jellybeans_overrides['background'] = { 'guibg': 'none' }
endif
Thank you for your advice.
I tried
let g:jellybeans_overrides = {
\ 'background': { 'ctermbg': 'none', '256ctermbg': 'none' },
\ 'CursorLine': { 'guibg': '121212' },
\}
and
let g:jellybeans_overrides = {
\ 'background': { 'ctermbg': 'none', '256ctermbg': 'none' },
\ 'CursorLine': { '256ctermbg': 233 },
\}
and also
let g:jellybeans_overrides = {
\ 'background': { 'ctermbg': 'none', '256ctermbg': 'none' },
\ 'CursorLine': { '256ctermbg': '233' },
\}
but none works. What mistake did I make?
Those should all work on a terminal with 256-color support, and the first one should work everywhere. Make sure the let
is before the colorscheme jellybeans
call in your vimrc, check that cursorline
is set, and maybe try a brighter color to test with to be sure the difference is visible and not hidden by monitor contrast or something.
Closing for now, feel free to reopen if this isn't working for you.
This would not change the background of current line. Is there any way to customize my current line bg color?