如何在 Vim 中更改 Jellybeans 配色方案中某些文本对象的彩色背景? [英] How to change the colored background of some text objects in Jellybeans color scheme in Vim?

查看:44
本文介绍了如何在 Vim 中更改 Jellybeans 配色方案中某些文本对象的彩色背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用 gVim,但现在我切换到终端 Vim 并希望摆脱一些在某些文本下呈现的烦人的背景突出显示.以下是我正在谈论的一些示例:

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:

我目前使用的 Vim 配色方案是 Jellybeans,我在 ~/.vim/colors/jellybeans.vim 找到了它的文件.

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

我应该在该配色方案文件中更改哪些内容以消除某些文本周围的背景突出显示?

推荐答案

红色和紫色背景的文字片段可能是拼写错误.您使用的配色方案未配置突出显示拼写错误,所以默认是活动的.

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.

有四个高亮组负责拼写错误’外观:SpellBadSpellCapSpellRareSpellLocal(见:help 拼写快速入门).这些组的默认选项是定义如下:

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

您可以将这些组的突出显示设置更改为您的喜欢,然后附加相应的 :highlight 命令到自定义配色方案文件.

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.

请注意,也可以手动运行 :highlight 命令并即时体验外观的变化,以找到合适的无需重新加载整个配色方案文件.

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.

这篇关于如何在 Vim 中更改 Jellybeans 配色方案中某些文本对象的彩色背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆