ben lieb wrote:
I've started using gvim through cygwin on windows and I'm having to set
the color scheme and font every time I open it. Is there a way to set
this in an rc file or somewhere?
I put the following in my .vimrc file, but it seems to have had no
effect on the default setting.
set guifont=Terminal:10
I don't know the commands to set color schemes.
Any help appreciated,
Ben
The format of the 'guifont' option varies between versions of gvim. If the
version of gvim which you're using under cygwin is a "cygwin" version
accessing the graphical screen through X11-for-cygwin, it won't accept the
":set" command above. Here is a (hopefully) platform-independent way of
setting 'guifont' (for 10pt Courier New; modify at will, keeping the format):
if has("gui_running") " 'guifont' doesn't work in the console
if has("gui_gtk2") " GTK+2 but not GTK+1
set guifont=Courier\ New\ 10
elseif has("gui_kde") " the obsolete kvim (6.2 or earlier)
set guifont=Courier\ New/10/-1/5/50/0/0/1/0
elseif has("gui_photon")" QNX Photon
set guifont=Courier\ New:s10
elseif has("x11") " other X11 GUIs, including GTK+1
set guifont=*-courier-medium-r-normal-*-*-100-*-*-m-*-*
else" non-X11 GUIs (Windows, Carbon, ...)
set guifont=Courier_New:h10
endif
endif
The order of "elseif" clauses is important: has("x11") must be just before the
"else" clause because the three GUIs above it also display through X11 but
don't accept the XLFD format.
Best regards,
Tony.
--
Air is water with holes in it