Larson, David wrote:
I just upgraded to 7.1, and now when I open up a gvim session, I get
this huge monospaced font that I can't change. If I type:

:set guifont?

it returns "7x14" which is what I set it to, but it isn't what is
displayed. If I change the setting to *any* other font that is valid for
my system, the display doesn't change, although the guifont setting
shows that it is set to the new value.



VIM - Vi IMproved 7.1 (2007 May 12, compiled May 14 2007 09:50:48)
Big version with GTK2 GUI.  Features included (+) or not (-):

With a GTK2 GUI, you can set the font interactively, using

        :set guifont=*

This will bring up a font chooser menu. Thereafter,

        :set guifont=<Tab>

will show on the command-line the exact command (with escaping backslashes if and where needed) that you need to write into your vimrc to set that font.

There are (including the obsolete kvim) five different "families" of Vim GUIs, each of which requires a different 'guifont' format, not accepted by other GUIs. The following is what I use in my "portable vimrc" to "sniff" the GUI version:

if has("gui_running")                 " console Vim cannot set the font
        if has("gui_gtk2")            " GTK+2, not GTK+1
                set gfn=Bitstream\ Vera\ Sans\ Mono\ 9
        elseif has("gui_photon")      " Photon GUI
                set gfn=Bitstream\ Vera\ Sans\ Mono:s9
        elseif has("gui_kde")         " the obsolete kvim
                set gfn=Bitstream\ Vera\ Sans\ Mono/9/-1/5/50/0/0/0/1/0
        elseif has("x11")             " other X11 GUIs including GTK+1
                set gfn=-*-lucidatypewriter-medium-r-normal-*-*-100-*-*-m-*-*
        else                          " non-X11 GUIs including Windows
                set gfn=Lucida_Console:h9:cDEFAULT

Best regards,
... My pants just went on a wild rampage through a Long Island Bowling

Reply via email to