Sunday, November 3, 2013

Re: Save default font on Gvim on Windows 7.

On 03/11/13 03:21, Ben Fritz wrote:
> On Saturday, November 2, 2013 2:35:03 PM UTC-5, John Sonderson wrote:
>> 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.
>
> Setting guifont in the _vimrc works just fine in Vim 7.4 on Windows 7. I've been using 7.4 since it came out of beta on Windows 7, and I set my font to DejaVu Sans Mono in my _vimrc.
>
> To set the font, I always use:
>
> :set guifont=*
>
> This brings up a dialog for me to select the font as I like it.
>
> Then I can :echo getfontname() to see what that turns into as a Vim option value.
>

Yes, ":set gfn=*" is a good thing to use, in the GUI flavours that
support it (Win32, GTK, Motif, Mac OS and Photon, according to the
help). "GTK" here means both GTK2 and the now upstream-unsupported GTK1.

Once the font is set, you can also use

:set gfn=<Tab> (without <Enter>)

to see it displayed with backslash-escaping if and where needed. On
Windows you can usually set 'guifont' with no need for
backslash-escaping (replacing any spaces by underscores) but for
instance on GTK2, with my current settings,

:echo '«' . getfontname() . '»'

returns «Bitstream Vera Sans Mono 8», and

:verbose set gfn?

returns

guifont=Bitstream Vera Sans Mono 8
Last set from ~/.vimrc

but

:set gfn=<Tab>

completes the command to

:set gfn=Bitstream\ Vera\ Sans\ Mono\ 8|

where the | at the end represents the cursor.



Best regards,
Tony.
--
The makers may make
and the users may use,
but the fixers must fix
with but minimal clues

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: