Régis B. wrote:
Hello there,
I use gVim with the GTK2+ GUI, under KUbuntu. Here is my problem: the
default font is correct, as you can see:
http://www.nabble.com/file/4262/gVim_correct.png
But as soon as I try to set the font, with :set guifont=Sans \9 for
instance, I get a lot of space between the characters:
http://www.nabble.com/file/4263/gVim_toowide.png
Ugly, isn't it? You have any idea how to fix this?
Régis
That second example doesn't look "too wide" to me when the width of the widest
letters is taken into account. With that 'guifont' setting, open an empty
buffer and type
MMMMMMMMMMMMMMM
into it. I bet the spacing between the (relatively wide) capital-M letters
won't look too widely spaced at all.
Unlike other GUIs, GTK2 gvim can use even non-monospace fonts, but it still
displays them within Vim's fixed "character grid". I suspect your "Sans" font
is one such "non-monospace" font. To correct the spacing, use a different font
name, for a truly fixed-width font. Names including "courier", "typewriter" or
"mono" as part of the name (possibly with a different case) are "likely
candidates" to be tried when a monospace font is desired.
Best regards,
Tony.