1

When I use the colorscheme gruvbox (installed with vim-plug), it overrides my configuration of the Cursorline highlight, eg

set cursorline
hi CursorLine cterm=NONE ctermbg=black

with the same color as the statusbar, which makes it easy to confuse the cursorline with the statusline of a horizontally split buffer.

I would like to set the cursorline background color to pure black, or at least to the black defined by the gruvbox colorscheme, but I can't change the highlight using the hi(ghlight) CursorLine command when using gruvbox.

I couldn't find how to configure this in the gruvbox wiki, does anybody have a solution to this?

1
2

What works for me, in your .vimrc first set your colorscheme, then your desired highlight:

colorscheme gruvbox
highlight Cursorline whatever_you_like

That way your colorscheme won't clobber your highlight.

1
  • yes, that is what I use now too. The problem was set termguicolors
    – stimulate
    Oct 2 '18 at 14:45
1

Appearently this line

set termguicolors

overrides the highlight color. removing it let me configure the CursorLine highlight color again.

Not the answer you're looking for? Browse other questions tagged or ask your own question.