Benaiah\’s Computer Experiences

January 17, 2012

Customizing GVim in Windows 7

Filed under: Programming, Vim, windows, Windows 7 — Tags: , , , , , , — Benaiah @ 11:15 pm

I recently set up GVim on my windows 7 machine and here are some of the GUI customizations I made.

What files?

There are two files the you’ll need to customize GVim in Windows.  The _vimrc file and the _gvimrc file.  Note that in windows the file names are proceeded by and underscore character rather than a dot as in linux.  These files should be created in your “C:\Program Files\Vim” directory.  The basic rule for figuring out which file your customizations should go in is this: if it has to do with the graphic display of GVim put it in the _gvimrc file. Command type configuration should go in the _vimrc file.

Changing the theme: 

Download the color scheme to C:\Program Files\Vim\vimfiles\colors (if this directory doesn’t exist create it)

Ex: C:\Program Files\Vim\vimfiles\colors\wombat.vim

Add the following line to your _gvimrc file:

colorscheme [colorscheme name]

Ex: “colorscheme wombat” sans quotes.

As a side note, the wombat color scheme is one of my favorites for VIM.  Here is a quick screen shot of the wombat theme.

Vim Wombat Color Scheme

It can be downloaded here:

Change the default font:

Add the following line to your _gvimrc file:

set guifont=[Font Name]:[size]:cDEFAULT

Ex:  set guifont=Consolas:h11:cDEFAULT

When using GVim I also like to remove the menu bar, the tool bar and right-hand scroll bar to make the experience look more like the traditional Vim experience on a linux machine.

Remove the manu bar:

Add the following line to your _gvimrc file

set guioptions-=m

Remove the tool bar:

Add the following line to your _gvimrc file

set guioptions-=T

Remove the right-hand scroll bar:

Add the following line to your _gvimrc file

set guioptions-=r

Create a free website or blog at