3

My vim and gvim have different colour settings.

vim

gvim

I want to use the same colour settings in both.

I checked I am not using any .vimrc or .gvimrc configuration file at the moment.

How do I unify the colour settings? (preferably use gvim's colour settings in vim also)

1 Answer 1

4

If you want both vim and gvim to use the same color scheme, place the configuration in .vimrc. Unless overridden in .gvimrc, gvim will use whatever is specified in .vimrc:

colorscheme XYZ

You can't have vim and gvim look exactly the same; vim, running in a terminal, doesn't have control over background color. Also, unless you're running a 256-color terminal, gvim has a lot more colors available to it for use in color schemes (that color schemes may or may not use). If you want them to look exactly the same, you may need to create/custimize your own theme.

So, if you have a terminal which supports 256 colors, set

export TERM=xterm-256color

before running vim and hope that the colorscheme XYZ looks the same in vim as in gvim :)

2
  • What should I write in my .vimrc for it to use the default colour configuration (so that both vim and gvim use the same default colour configuration)?
    – Lazer
    May 18, 2010 at 8:42
  • @eSKay: "colorscheme xyz". the problem is that your terminal must support the same colors the colorscheme wants. your best bet is to use a 256-color-terminal with setting the environment variable TERM=xterm-256color (for example).
    – akira
    May 18, 2010 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .