本文介绍了设置VIM背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用命令来改变背景颜色的.vimrc 或者直接在vim:

When I try to change the background colors in .vimrc or directly in vim using the command:

set background=dark

...它不会影响我的背景都没有。无论是否选项。然而,这看起来还好,当我运行gvim的。

... it doesn't affect my background at all. Neither does the light option. However, it looks okay when I run gvim.

有没有办法来改变vim的背景没有改变我的Konsole设置?

Is there a way to change the background in vim without changing my Konsole settings?

修改好吧,有guifg / guibg和ctermfg使用/ ctermbg之间的差异。虽然GUI接受许多不同的颜色组合,CTERM只允许几个标准的人。

EDIT Okay, there is a difference between guifg/guibg and ctermfg/ctermbg. While the GUI accepts lots of different color combinations, cterm allows only few standard ones.

推荐答案

由于vim的自己的帮助说,设置该选项不改变背景颜色,它告诉Vim背景颜色是什么样子为了改变背景色,见|:你好,正常|

As vim's own help on set background says, "Setting this option does not change the background color, it tells Vim what the background color looks like. For changing the background color, see |:hi-normal|."

例如

:highlight Normal ctermfg=grey ctermbg=darkblue

将在白色蓝色写你的颜色终端上。

will write in white on blue on your color terminal.

这篇关于设置VIM背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 03:31