How to Save Font Choice in gVim

gvim

I'm running Ubuntu 9.10. Whenever I open the gvim application, I have to select a custom font (Edit→Select font). I would like gvim to remember my choice. Perhaps I need to edit the ~/.vimrc file, I am not sure.

How can I make gvim remember my preference?

Best Answer

Close. Set the font through the gui, then use the command (: to get the prompt) set gfn? to get the current font string. It should look something like this:

guifont=Mono Uralic 10

Then edit/create ~/.gvimrc and add the line:

set gfn=Mono\ Uralic\ 10

Note: You need to escape the spaces from the output (as I have above)

Related Question