Tanky Woo
Tanky Woo

Reputation: 5106

Why doesn't the font setting work in gvim?

In Fedora15, I was originally using vim, with all my settings defined in my ~/.vimrc file. I recently installed vim-X11, and have now transitioned to gvim. I defined a ~/.gvimrc file, with the following line to set the font:

set guifont=Bitstream_Vera_Sans_Mono:h11:cANSI

However, it doesn't work. There are two strange things:

  1. The other settings such as line number, color scheme works right, but font setting doesn't work. Instead, I need to set them in the tool bar every time to change the font: "Edit->Select Font".

  2. Every time I select "Edit -> Startup Settings", it opens the ~/.vimrc file instead of the ~/.gvimrc file.

Upvotes: 8

Views: 8806

Answers (2)

dannyliu
dannyliu

Reputation: 131

I find use set guifont=* then set guifont? will not work, butset guifont=Bitstream\ Vera\ Sans\ Mono\ 11 nice

Upvotes: 0

Cat Plus Plus
Cat Plus Plus

Reputation: 129764

Your guifont is valid only on Windows. In GTK GVim, you want:

set guifont=Bitstream\ Vera\ Sans\ Mono\ 11

Also, you can use set guifont=* to bring up a system dialog to choose a font, and then look at the contents of the setting with set guifont?.

GVim loads .vimrc and then .gvimrc, so you can separate settings that apply only to GUI version.

Upvotes: 20

Related Questions