Search code examples
vimfontsdefault

Set MacVim default font


How do I set the default font for MacVim?

I have tried adding the following line

set guifont = Monaco:h12

to either of the following files:

~/.vimrc
~/.gvimrc
~/Applications/MacVim/MacVim.app/Contents/Resources/vim/vimrc
~/Applications/MacVim/MacVim.app/Contents/Resources/vim/gvimrc
~/Applications/MacVim/MacVim.app/Contents/Resources/vim/.vimrc
~/Applications/MacVim/MacVim.app/Contents/Resources/vim/.gvimrc

I restarted MacVim, but it still won't set the default font. Anything I missed?

UPDATE: I can issue the set guifont command in runtime and it works fine. It just doesn't seem to read it off my startup files.


Solution

  • Place this in .gvimrc:

    set guifont=Monaco:h12
    

    Note the lack of spaces around the equals sign.