Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Macvim won't load specific color scheme by default

Tags:

vim

macvim

I'm having a problem similar to VIM Color scheme not loading by default

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

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

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

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.

Any ideas?

like image 273
Marcello Avatar asked Feb 10 '13 21:02

Marcello


Video Answer


1 Answers

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.

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

$ cd
$ echo "colorscheme gentooish" > .gvimrc

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
like image 191
glts Avatar answered Oct 22 '22 03:10

glts