views:

1034

answers:

2

Hi there,

I'm using macvim and I love it. I also happen to really like the default font.

My question is:

How do I change the font size in my .gvimrc? I want it to be bigger, without changing the font from the default.

All the examples I've seen specify a font then a ':' then the size.

So how do I just change the size not the font itself?

Thanks!

+4  A: 

The default font is Bitstream Vera (search for 'default font' on that page). So why not just specify that, but with a different font size? E.g.

:set guifont=Bitstream\ Vera\ Sans\ Mono:h14

This approach also ensures that if in future the default changes (e.g. to the system default, Monaco), you will still have your preferred font enabled.

ire_and_curses
I get an "Invalid Font" error.
Alex
Ah but I figured it out and it was closest to this. Thanks for getting me on the right track. It's `De Ja Vu Vera` on my system. Huh. Thanks anyhow!
Alex
@Alex: That's interesting. Looks like the docs are a little out of date then. This font is an extension of the original `Bitstream` font family, ["to provide a wider range of characters while retaining the original look and feel"](http://sourceforge.net/projects/dejavu/). Thanks for coming back with this info.
ire_and_curses
A: 

Try leaving the font blank, e.g set guifont=:h20 where 20 is the font size you want.

eddiegroves