How to set font in my _vimrc file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set font in my _vimrc file

cblasius
Hello,

I'm beginner in Vim on MS Windows XP. I use gvim63.

How I have to put in my _vimrc settings for font. Default I obtain
Fixedsys, Regular, size 9 font. I dislike it. I want to use Courier New,
Regular, size 10 font. What I have to write in my _vimrc file to get it?

Thanks for any help,
cblasius


Reply | Threaded
Open this post in threaded view
|

Re: How to set font in my _vimrc file

jn-4
The following line should do it:

  set guifont=Courier_New:h10:cANSI

Good luck

  J

> Hello,
>
> I'm beginner in Vim on MS Windows XP. I use gvim63.
>
> How I have to put in my _vimrc settings for font. Default I obtain
> Fixedsys, Regular, size 9 font. I dislike it. I want to use Courier New,
> Regular, size 10 font. What I have to write in my _vimrc file to get it?
>
> Thanks for any help,
> cblasius
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to set font in my _vimrc file

Tim Chase-2
In reply to this post by cblasius
> How I have to put in my _vimrc settings for font. Default I
> obtain Fixedsys, Regular, size 9 font. I dislike it. I want to
> use Courier New, Regular, size 10 font. What I have to write
> in my _vimrc file to get it?

Generally, one puts "gvim" (read "graphical") related stuff such
as fonts in the _gvimrc file rather than the _vimrc file.
However, to do as you desire, simply figure out what your current
font is:

        :set guifont?

It should return the setting for your guifont (which you've
likely set from the menu).  It will likely return something like

        guifont=courier_new:h9:w6

(that's mine, but yours may well be something like it)


Simply add a line in your _gvimrc file that reads

        set guifont=courier_new:h9:w6

and the next time you start gvim, it should be set for you.

-tim




Reply | Threaded
Open this post in threaded view
|

Re: How to set font in my _vimrc file

A.J.Mechelynck
In reply to this post by cblasius
----- Original Message -----
From: "cblasius" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, September 06, 2005 8:27 PM
Subject: How to set font in my _vimrc file


> Hello,
>
> I'm beginner in Vim on MS Windows XP. I use gvim63.
>
> How I have to put in my _vimrc settings for font. Default I obtain
> Fixedsys, Regular, size 9 font. I dislike it. I want to use Courier New,
> Regular, size 10 font. What I have to write in my _vimrc file to get it?
>
> Thanks for any help,
> cblasius

For Windows (or any non-X11 systems):

    set guifont=Courier_New:h10:cDEFAULT

    see
        :help 'guifont'
        http://vim.sourceforge.net/tips/tip.php?tip_id=632 "Setting the font
in the GUI".


Best regards,
Tony.