gvim fonts - How to set the default gvim font

Having just downloaded and installed vim (gvim) on my Mac (Mac OS X 10.5.x to be precise), and then struggling for a while to set the default font, I thought I'd make a brief note here about how to set the default font properly.

Setting a default gvim font in the gvimrc file

To set a default font for the gvim editor (in my case on Mac OS X), edit a file named ~/.gvimrc (i.e., a file named .gvimrc in your home directory), and add this line to get a 12-point Monaco font:

set guifont=Monaco:h12

That's all you have to do. The next time you start gvim, it will read this gvimrc configuration setting, and this should be your default gvim font.

.gvimrc versus .vimrc

From the behavior I've seen, the .gvimrc file in your home directory is read by gVim after the .vimrc file is read. I saw this when I was first putting my commands in the ~/.vimrc file, and some of my changes made it through, while others appeared to be overwritten. That's why I'm writing here that you should make your changes in the ~/.gvimrc file.


Many thanks to the creators of gVim, with special thanks to you for making it available on the Mac platform.


Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.