As the following post demonstrates:
How to change the default font of gVim
on Windows 7 it is impossible to save the default Gvim font from the Gvim program. Closing Gvim will cause it to completely forget about all font settings, and it is not possible to set them in the _vimrc file.
Has this been fixed in Gvim 7.4 or does this bug persist? Or does anyone know of a better way to set the default font? Cause the FixedSys font sucks as it cannot display Czech characters, and I don't want to have to go to the menu to change it every time I open a file that contains Czech characters. Thanks.
** EDIT **
OK, now I see the documentation for setting the font by issuing the Gvim command
:help guifont
Here is what I found:
For the Win32 GUI *E244* *E245*
- takes these options in the font name:
hXX - height is XX (points, can be floating-point)
wXX - width is XX (points, can be floating-point)
b - bold
i - italic
u - underline
s - strikeout
cXX - character set XX. Valid charsets are: ANSI, ARABIC,
BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
Normally you would use "cDEFAULT".
Use a ':' to separate the options.
- A '_' can be used in the place of a space, so you don't need to use
backslashes to escape the spaces.
- Examples:
:set guifont=courier_new:h12:w5:b:cRUSSIAN
:set guifont=Andale_Mono:h7.5:w4.5
so now for example from within Gvim I can do the the following:
:set guifont=Lucida_Console:h12:cDEFAULT
and I can put the command
set guifont=Lucida_Console:h12:cDEFAULT
inside C:\Users\JSonderson_gvimrc and this font family and font size and character set is loaded each time I start gvim.
However a question still remains, that is, how come UTF-8 is not on the list of character sets?
Isn't the character set something separate from the font anyways?
What's the difference between character set and character encoding?
How can I display the actual character set which is being used when I use the DEFAULT setting?
Thanks.
set guifont=Courier_New:h10:cANSI
guifont
setting in my ~/_vimrc. As for the character set vs. encoding question, I think Tony answered that pretty well in your thread in the vim mailing list and better than I could do.Font
,Font style
,Size
and (on Windows only)Script
. Encoding and font are different concepts. Encoding specifies the representation of characters in memory or in a file. Font specifies the look of characters on a display or page. To use gvim to view a file containing the Greek letter mu, for example, the bit pattern representing that character in the file must use some encoding that includes the character mu. To see that character on your display, you must use a font...