Macvim won't load specific color scheme by default

余生长醉 提交于 2019-12-05 03:42:19

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
  1. : is not needed in your ~/.vimrc.

  2. term and t_Co are terminal-specific options. MacVim being a GUI for Vim doesn't care about them. If you don't use Vim in a terminal, those two lines are not needed.

  3. set background=dark makes Vim do a few hardly noticeable but nifty things: it is set by Vim automatically and generally overwritten by your colorscheme. You can safely drop it from your ~/.vimrc.

Just to make sure we are on the same boat, could you confirm that:

  • your .vimrc path is ~/.vimrc?
  • your colorscheme path is ~/.vim/colors/gentooish.vim?
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!