简体   繁体   中英

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM