如何在 Vim 中更改 Jellybeans 配色方案中某些文本对象的彩色背景?
我曾经使用 gVim,但现在我正在切换到终端 Vim,并希望摆脱一些在某些文本下呈现的烦人的背景突出显示。以下是我所讨论内容的一些示例:
我当前使用的 Vim 配色方案是 Jellybeans,我将其文件定位于~/.vim/colors/jellybeans.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:
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
红色和紫色背景上的文字可能是拼写错误的
错误。您使用的配色方案未配置突出显示
拼写错误,因此默认处于活动状态。
有四个突出显示组负责拼写错误'
外观:
SpellBad
、SpellCap
、SpellRare
、SpellLocal
(请参阅:帮助拼写快速入门
)。这些组的默认选项是定义如下:
您可以将这些组的突出显示设置更改为您的
喜欢,然后追加相应的
:highlight
命令到自定义配色方案文件。
请注意,也可以手动运行
:highlight
命令并快速体验外观变化,找到合适的
颜色而无需重新加载整个配色方案文件。
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 aredefined to be something like the following:
You can change the highlighting settings of these groups to your
liking, and then append the corresponding
:highlight
commandsto a custom color scheme file.
Note that it is also possible to run
:highlight
commands manuallyand experience changes in appearance on the fly, to find the right
colors without reloading the whole color scheme file.