RE: I can't change the font in vim7.1!

2007-05-14 Thread Larson, David
Okay. I've found a clue to my problem. I'm on a kde system, and I'm
obtaining a list of valid fonts with the xlsfonts command. I don't
know much about how the kde gui works, bit it appears that the xlsfonts
command and kde are incompatible. Now to figure out how to get a list of
kde fonts. 

Thanks,
David

-Original Message-
From: Larson, David 
Sent: Monday, May 14, 2007 10:07 AM
To: vim-dev@vim.org
Subject: I can't change the font in vim7.1!

I just upgraded to 7.1, and now when I open up a gvim session, I get
this huge monospaced font that I can't change. If I type:

:set guifont?

it returns 7x14 which is what I set it to, but it isn't what is
displayed. If I change the setting to *any* other font that is valid for
my system, the display doesn't change, although the guifont setting
shows that it is set to the new value.

Help!
David

:version
shows:

VIM - Vi IMproved 7.1 (2007 May 12, compiled May 14 2007 09:50:48)
Compiled by [EMAIL PROTECTED]
Big version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard
+cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope
+cursorshape +dialog_con_gui +diff +digraphs
+dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +folding -footer +fork()
-gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap
+libcall +linebreak +lispindent +listcmds
+localmap +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec
+mouse_gpm -mouse_jsbterm +mouse_netterm
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg
-osfiletype +path_extra -perl +postscript +printer
-profile -python +quickfix +reltime +rightleft -ruby +scrollbind +signs
+smartindent -sniff +statusline
-sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl
+terminfo +termresponse +textobjects +title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
+viminfo +vreplace +wildignore +wildmenu
+windows +writebackup +X11 -xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save
   system vimrc file: $VIM/vimrc
 user vimrc file: $HOME/.vimrc
  user exrc file: $HOME/.exrc
  system gvimrc file: $VIM/gvimrc
user gvimrc file: $HOME/.gvimrc
system menu file: $VIMRUNTIME/menu.vim
  fall-back for $VIM: /home/x0075669/share/vim
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I
/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
-I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -g -O2  -I/usr/X11R6/include
Linking: gcc  -L/usr/X11R6/lib   -L/usr/local/lib -o vim
-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.
0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurs
es -lacl -lgpm


Re: I can't change the font in vim7.1!

2007-05-14 Thread A.J.Mechelynck

Larson, David wrote:

I just upgraded to 7.1, and now when I open up a gvim session, I get
this huge monospaced font that I can't change. If I type:

:set guifont?

it returns 7x14 which is what I set it to, but it isn't what is
displayed. If I change the setting to *any* other font that is valid for
my system, the display doesn't change, although the guifont setting
shows that it is set to the new value.

Help!
David

:version
shows:

VIM - Vi IMproved 7.1 (2007 May 12, compiled May 14 2007 09:50:48)
Compiled by [EMAIL PROTECTED]
Big version with GTK2 GUI.  Features included (+) or not (-):


With a GTK2 GUI, you can set the font interactively, using

:set guifont=*

This will bring up a font chooser menu. Thereafter,

:set guifont=Tab

will show on the command-line the exact command (with escaping backslashes if 
and where needed) that you need to write into your vimrc to set that font.


There are (including the obsolete kvim) five different families of Vim GUIs, 
each of which requires a different 'guifont' format, not accepted by other 
GUIs. The following is what I use in my portable vimrc to sniff the GUI 
version:


if has(gui_running)  console Vim cannot set the font
if has(gui_gtk2) GTK+2, not GTK+1
set gfn=Bitstream\ Vera\ Sans\ Mono\ 9
elseif has(gui_photon)   Photon GUI
set gfn=Bitstream\ Vera\ Sans\ Mono:s9
elseif has(gui_kde)  the obsolete kvim
set gfn=Bitstream\ Vera\ Sans\ Mono/9/-1/5/50/0/0/0/1/0
elseif has(x11)  other X11 GUIs including GTK+1
set gfn=-*-lucidatypewriter-medium-r-normal-*-*-100-*-*-m-*-*
else   non-X11 GUIs including Windows
set gfn=Lucida_Console:h9:cDEFAULT
endif
endif


Best regards,
Tony.
--
... My pants just went on a wild rampage through a Long Island Bowling
Alley!!