4

I use gvim on Windows. By default it uses the Fixedsys font, but I would like to use Consolas as the default font instead.

I tried to set it using the menu option; it worked but it was reset the next time I started gvim.

How can I set the default font in gvim? Can I add anything to .vimrc?

Gaff
  • 18,569
  • 15
  • 57
  • 68
Jonas
  • 26,874
  • 52
  • 105
  • 125

1 Answers1

7

i would add it to _gvimrc, the relevant part of mine looks like this:

if has("gui_kde")
    set guifont=Consolas/13/-1/5/50/0/0/0/0/0
elseif has("gui_gtk")
    set guifont=Consolas\ 13
elseif has("gui_running")
    if has("win32") || has("win64")
        set guifont=Consolas:h12
    else
        set guifont=-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1
    endif
endif
akira
  • 61,009
  • 17
  • 135
  • 165
  • Not sure where the _gvimrc file is located on Windows? This question will help you find it: http://superuser.com/q/86246/140266 – Steve HHH Feb 23 '13 at 00:33