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

February 21, 2009

Resizing Vertical Viewports in Vim

Filed under: Programming, Vim — Tags: , , , — Benaiah @ 1:06 pm

One way to make your use of Vim more efficient is to make use of viewports (splits).  This article from explains just about everything about how to used the viewports in vim.  However there is one thing it does not mention, and this is how to changed the width of a vertical viewport.  Here’s how.

Ctrl+w > widens the viewport  (Press Ctrl+w and then “>”)

Ctrl+w < narrows the viewport (Press Ctrl+w and then “<“)

As usual with vim you can also use modifiers  to chage how much you widen/narrow the view port.  For example, to widen it by a 10 instead of 1:

Ctrl+w 10> widens viewport by 10

The number can be replaced with any value and also applies to the narrow viewport command.

Create a free website or blog at