开发者

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

开发者 https://www.devze.com 2023-04-07 13:23 出处:网络
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 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:

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

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

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

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号