Macvim默认不会加载特定的配色方案 [英] Macvim won't load specific color scheme by default

查看:115
本文介绍了Macvim默认不会加载特定的配色方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到类似于> VIM配色方案默认未加载的问题

除了我在这里找到的gentooish主题有问题之外 http://www.vim.org/scripts/script.php?script_id=2474

Except I am having the problem with the gentooish theme found here http://www.vim.org/scripts/script.php?script_id=2474

由于某些原因,macvim默认拒绝加载此颜色方案.

For some reason macvim refuses to load this colorscheme by default.

我的vimrc文件如下,我没有.gvimrc文件.

My vimrc file is as follows, I do not have a .gvimrc file.

:set term=xterm-256color
:set t_Co=256
set background=dark
colorscheme gentooish

但是一旦我打开macvim,:colorscheme gentooish它将很好地加载.如果我在命令行上输入vim,它也会默认加载.默认情况下,它不会在macvim中加载.

But once I have macvim opened if I do :colorscheme gentooish it will load fine. Also it does load by default if I type vim on the command line. It just won't load by default in macvim.

有什么想法吗?

推荐答案

MacVim加载其自己的默认gvimrc文件,该文件将应用默认的colorcheme.由于gvimrc文件是在 vimrc文件之后处理的,因此:colorscheme指令的颜色将被默认gvimrc中的颜色覆盖.

MacVim loads its own default gvimrc file, which applies a default colorscheme. Since gvimrc files are processed after vimrc files, the colours of your :colorscheme instruction are overwritten by the ones from the default gvimrc.

有两种解决方案:创建您自己的gvimrc文件,并在其中放置colorscheme命令:

There are two solutions: Create your own gvimrc file and put the colorscheme command there:

$ cd
$ echo "colorscheme gentooish" > .gvimrc

或者,将以下行放入vimrc中,以防止MacVim应用自己的颜色方案(请参见:h macvim-colorscheme).

Alternatively, put the following line in your vimrc, which prevents MacVim from applying its own colorscheme (see :h macvim-colorscheme).

let macvim_skip_colorscheme = 1

这篇关于Macvim默认不会加载特定的配色方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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