[vox-tech] Setting the font in gvim (Vim with GUI)

Henry House hajhouse at houseag.com
Sat Nov 18 10:31:42 PST 2006


P=E5 2006-11-16, skrev Ken Bloom:
[...]
> Escape the spaces with a backslash:
> =

> My .gvimrc contains:
> =

> if has("gui_gtk2")
>    set guifont=3DMonospace\ 8
> else
>    set guifont=3D-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso10=
646-1
> endif
> =

> function Kprinter()
>    call system('kprinter ' . v:fname_in)
>    call delete(v:fname_in)
>    return v:shell_error
> endfunc
> =

> =

> The Kprinter function is kinda cool. I run :set printexpr=3DKprinter()
> and then when I use the :hardcopy (:ha) command, I get a proper print
> dialog box.

Thanks Ken, this works perfectly! =


For :hardcopy, I'm using the following:

set printexpr=3DPrintFile(v:fname_in)
function PrintFile(fname)
  call system("gv " . a:fname)
  call delete(a:fname)
  return v:shell_error
endfunc
set printoptions=3Dpaper:letter

which gives me a preview in Ghostview before printing anything.

-- =

Henry House
+1 530 753 3361 ext. 13
Please don't send me HTML mail! My mail system frequently rejects it.
The unintelligible text that may follow is a digital signature.
See <http://hajhouse.org/pgp> to find out how to use it.
My OpenPGP key: <http://hajhouse.org/hajhouse.asc>.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lugod.org/pipermail/vox-tech/attachments/20061118/9328a7=
ea/attachment.pgp


More information about the vox-tech mailing list