Vim 配色方案更改 [英] Vim colorscheme change

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

问题描述

我很难改变我的配色方案.我打开了 ~/.vimrc 和/usr/share/vim/vimrc 并添加了:

I'm having difficulty getting my colorscheme to change. I've opened both ~/.vimrc and /usr/share/vim/vimrc and added:

colorscheme desert

……什么也没有.我注意到配色方案在这里:

...and nothing. I noticed the color schemes are here:

/usr/share/vim/vim72/colors/desert.vim (...along with a bunch or others)

这似乎是错误的地方,所以我:

which seems like the wrong place so I:

cp /usr/share/vim/vim72/colors/desert.vim ~/.vim/colors/

还是不行.

推荐答案

自定义颜色方案应该在 ~/.vim/colors/中,并且在 ~/.vimrc 中添加颜色方案行应该可以工作.所以听起来你做对了.

Custom colorschemes should go in ~/.vim/colors/, and adding the colorscheme line in your ~/.vimrc should work. So it sounds like you're doing that right.

仔细检查您的 vimrc 或包含的配置文件中是否没有其他颜色方案行可能会覆盖它.

Double-check that you don't have some other colorscheme line lower down in your vimrc or in an included config file that might be overriding it.

还要仔细检查您的 .vimrc 是否按预期加载.一种简单的判断方法是尝试加载一个不存在的颜色方案名称 - 如果正在解析该行,那么您应该得到如下错误:

Also double-check that your .vimrc is being loaded as expected. One easy way to tell is by trying to load a nonexistant colorscheme name - if the line is being parsed, then you should get an error like:

E185: Cannot find color scheme foobarbaz

如果您的颜色方案行被正确解析,您需要检查您的终端是否正确配置为显示颜色.

If your colorscheme line is being correctly parsed, you need to check if your terminal is correctly configured to display the colors.

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

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