Vim 语法高亮 [英] Vim syntax Highlighting

查看:45
本文介绍了Vim 语法高亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Debian 6 中安装了 vim.我正在尝试更改配色方案并启用语法突出显示.但它不起作用.我在 .vimrc 文件中添加了 set background=dark.但是白色背景正在显示.我想知道出了什么问题?

I have installed vim in Debian 6. I am trying to change color scheme and enable syntax highlighting. But it's not working. I added set background=dark in .vimrc file. But white background is displaying. I wonder what went wrong?

这是我的 .vimrc 文件:http://pastebin.com/8k2gpWDh

我安装了具有深色背景的 robokai 颜色方案.但是背景看起来是白色而不是黑色.其他颜色的配色方案有效.

I installed robokai colorscheme which has dark background. But the background looks white instead dark. Other colors of colorscheme working.

推荐答案

确保你有

syntax on

然后调用

color[scheme] {name}

设置您想要的配色方案.这些包含 set background=dark 你参考,所以它应该是一个选择正确的问题.Vim 附带了一些配色方案,但您可能需要安装新的配色方案.

To set your desired colorscheme. These contain the set background=dark you refered, so it should be a matter of choosing the right one. Vim comes with some color schemes, but you may want to install new ones.

本页这个提供了配色方案的提示,并且有一个测试页在选择配色方案时非常有用.

This page and this one provide tips on color schemes, and there is a test page very helpful when choosing colorschemes.

这篇关于Vim 语法高亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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