Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My vim and gvim have different colour settings.



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)

share|improve this question
up vote 3 down vote accepted

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 :)

share|improve this answer
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 '10 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 '10 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.