How to change the colored background of some text objects in Jellybeans color scheme in Vim?
Asked Answered
R

1

3

I used to use gVim, but now I am switching to terminal Vim and would like to get rid of some annoying background highlighting which is being rendered under certain text. Here are some examples of what I am talking about:

enter image description here

enter image description here

The Vim color scheme I am currently using is Jellybeans, and I have located its file at ~/.vim/colors/jellybeans.vim.

What should I change in that color scheme file to get rid of the background highlighting around some of the text?

Reversion answered 26/9, 2011 at 22:0 Comment(1)
Jellybeans sets colors for spell checking as of v1.4. (although, also with background highlighting.)Morgen
V
6

The pieces of text on red and violet background are probably spelling errors. The color scheme you use does not configure the highlighting for spelling errors, so the default one is active.

There are four highlighting groups responsible for spelling errors’ appearance: SpellBad, SpellCap, SpellRare, SpellLocal (see :help spell-quickstart). The default options for these groups are defined to be something like the following:

:hi SpellBad term=reverse ctermbg=224 gui=undercurl guisp=Red
:hi SpellCap term=reverse ctermbg=81 gui=undercurl guisp=Blue
:hi SpellRare term=reverse ctermbg=225 gui=undercurl guisp=Magenta
:hi SpellLocal term=underline ctermbg=14 gui=undercurl guisp=DarkCyan

You can change the highlighting settings of these groups to your liking, and then append the corresponding :highlight commands to a custom color scheme file.

Note that it is also possible to run :highlight commands manually and experience changes in appearance on the fly, to find the right colors without reloading the whole color scheme file.

Visa answered 27/9, 2011 at 11:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.