vim 中的语法高亮
当我在 vim 中打开语法颜色时,我无法在黑色上阅读深蓝色。
如何更改某些默认颜色或模式颜色,例如:
I'm having trouble reading dark blue on black when I turn on syntax colours in vim.
How do I change some of the default colours or the colours of schemas like:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
首先,尝试
:set background=dark
,这将使 vim 更改为更适合在黑色背景上阅读的配色方案。如果这还不够好,您可以按照以下说明创建自己的配色方案: http:// vim.wikia.com/wiki/Create_a_color_scheme_based_on_another
First, try
:set background=dark
, which will cause vim to change to a color scheme that works better for reading on a black background.If that doesn't work well enough, you can create your own color scheme by following these directions: http://vim.wikia.com/wiki/Create_a_color_scheme_based_on_another
您可以通过以下方式切换
colorscheme
:在所有可用的 colorchemes 上用 Tab 键圈出:
如果您需要更多方案,请从 http://vimcolorschemetest.googlecode.com/svn/html/index-c.html
You can switch the
colorscheme
with:Tab circles over all available colorschemes:
If you need more schemes get some from http://vimcolorschemetest.googlecode.com/svn/html/index-c.html
正如 stefanB 所说,您可以使用
:colo[rscheme]
命令更改颜色方案。有十几个内置方案,您可以从 Vim 网站下载数千个。我建议安装 Color Sampler Pack - 这是一个选择100 种最流行的配色方案,并且在 Gvim 中添加了一个菜单,可以让您轻松地在它们之间切换。
As stefanB says, you can change colorschemes with the
:colo[rscheme]
command. There are a dozen or so built in schemes, and you can download thousands more from the Vim website.I recommend installing the Color Sampler Pack - this is a selection of the 100 most popular colorschemes, and in Gvim it adds a menu that will let you switch between them easily.
最喜欢的颜色方案(使用 :colo[rscheme] 设置,如多次提到的)
“深色背景
“科罗拉多沙漠256
“科洛·xoria256
“科洛·维莱特
“彩色板岩
”浅色背景
“科罗拉多州夏季水果256
” 科洛美256
“colo phpx
“colo Morning
*256 在通过腻子工作时效果很好。
我对背景设置的理解是它会调整配色方案的颜色,以便它们在深色或浅色背景上更明显。尽管我使用的方案似乎可以处理这个问题自己好看看:
Favorite colorschemes (set with :colo[rscheme] as mentioned a few times)
" Dark Background
"colo desert256
"colo xoria256
"colo vylight
"colo slate
" Light Background
"colo summerfruit256
"colo beauty256
"colo phpx
"colo morning
The *256 ones work well when working through putty.
My understanding of the background settings is that it tweaks the colors of your colorscheme so they are more visible on a dark or light background. Although the schemes i use seem to handle this themselves well. See:
那种深蓝色很难确定。我不知道您在什么环境中工作,但我通常会调整控制台或腻子中的颜色设置,以便它显示得更好。这将保护您免受其他也想使用该颜色的程序的影响。
That dark blue color is hard to see for sure. I don't know what environment you're working in, but I normally tweak the color settings in my console or putty so that it shows up better. This will protect you from other programs that want to use that color too.
我不确定这是否能回答您的问题,但有多种方法可以获得不同的配色方案。我最喜欢的(也是我唯一真正熟悉的)是
这使得大多数代码更易于阅读。
I'm not sure if this answers your question, but there are several ways to get different color schemes. My favorite (and the only one I'm really familiar with) is
This makes most code easier to read.