Yakov Lerner wrote:
On 7/31/06, Robert Cussons <[EMAIL PROTECTED]> wrote:
Robert Cussons wrote:
> Peter Hodge wrote:
>> Some GUIs will allow you to use the command
>> set guifont=*
>> Which brings up a font selection window. If that works, you can
>> select a font
>> and then use
>> set guifont
>> to find out exactly what to add to your .vimrc
>> --- Yakov Lerner <[EMAIL PROTECTED]> wrote:
>>> On 7/31/06, Robert Cussons <[EMAIL PROTECTED]> wrote:
>>>> I just installed vim 7 on my linux system at work (more specifically
>>>> debian sarge running KDE 3.3) and I get a few funny things
>>>> happening. It
>>>> is installed in my home/bin directory as I don't have root
>>>> All comments seem to come out underlined and the fonts for
>>>> including the menus are different to before, I don't know how to
>>>> the current font setting, but when I type :set, there doesn't seem
>>>> to be
>>>> anything that would have changed the font listed. Anyone had the
>>> :set guifont?
>> Send instant messages to your online friends
I found out by accident that the font is Monospace 10, so I put the
following line in my .vimrc
set guifont=Monospace\ 10
but I still get different fonts, I have attached a screenshot of two
gvim sessions, lhs is gvim7, rhs is gvim6.3, if you look at the bottom
of each window is sets the font as I have just executed :set guifont? in
each of the windows. They have both accessed and read the .vimrc it
would seem, so what is wrong?
Are those two vims built with same GUI libraries ? I suspect
that they are build with different GUIs.
Can you send first 4 lines out :version output from each of two vims ?
P.S. I remember that I had similar issue between one Qt-based
program and similar Xt-based program. I set same font for them two,
but they showed it rather differently. Maybe you'll want to rebuild
vim7 to use same GUI as your vim6.3. If you send first 4 lines from
both vims :version, we'll know which GUI they are both built with.
":set guifont=Monospace\ 10" is applicable only to GTK+2 (or GNOME 2).
kvim would require ":set guifont=Monospace/10"; other X11 GUIs would
require something like ":set
guifont=*-monospace-medium-r-normal-*-*-180-*-*-m-*-*"; and non-X11 GUIs
something like ":set guifont=Monospace:h10".
However, IIUC "Monospace" is a generic font name (like "Serif" or
"Sans-serif"). I believe the mapping from such "generic" names to
"actual" fonts (like Courier or Lucida for Monospace, Times or Century
for Serif, Arial or Helvetica for Sans-serif, etc.) can be different
from one system to another.
The OP might want to find one particular fixed-width font that suits him
and try to set that on his several systems. If his version of gvim
allows it, he can try ":set guifont=*" for a start; if it doesn't, he
can paste into his vimrc the following snippet:
set guifont=Courier\ 10
let &guifont = "*-courier-medium-r-normal"
\ . "-*-*-100-*-*-m-*-*"
where I have intentionally cut the long Xft font name in two to avoid
problems with "beautifying" mail clients. (This assumes 'nocompatible'
Then, once the 'guifont' looks "almost right", the value can be edited
on the command-line by means of
which will recall the current value with escaping slashes if and where
required. Edit it on the command line, then hit Enter to accept the
changes or Esc to cancel the changes. Once the value is "just right",
copy it back to the vimrc.
Remember that changing the 'guifont' will usually change the pixel size
of the character cell, which may in turn require setting 'lines' and
'columns' again. If you want gvim to be maximized, use ":set lines=999
columns=999" immediately after every change to 'guifont'.