Why doesn't font customization work in gvim?

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

 set guifont=Bitstream_Vera_Sans_Mono:h11:cANSI 

However, this will not work. There are two strange things:

  • Other settings, such as line number, color scheme, work correctly, but font settings do not work. Instead, I need to install them every time on the toolbar to change the font: "Change-> Select Font".

  • Each time I select "Edit → Startup Settings", it opens the ~/.vimrc file instead of the ~/.gvimrc .

+6
source share
2 answers

Your guifont valid for Windows only. In GTK GVim you want:

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

Alternatively, you can use set guifont=* to open the system dialog to select a font, and then look at the contents of this parameter with set guifont? .

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

+15
source

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

0
source

Source: https://habr.com/ru/post/911485/


All Articles