printing from gvim
David Brown
kplug at davidb.org
Wed Mar 17 21:34:36 PDT 2010
On Wed, Mar 17, 2010 at 07:01:16AM -0700, James G. Sack (jim) wrote:
>> printexpr=system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice) . ' ' . v
>> :fname_in) . delete(v:fname_in) + v:shell_error
>
>I gather the part starting with v:fname_in is the temporary ps file. The
>part from "+" on is slightly mysterious, but seemingly deals with the
>shell result code.
>
>I suppose there must be a way to wimp out by rewriting printexpr to use
>(say) hp-print?
Can hp-print accept postscript? The v:fname_in is set to a temporary
file containing generated postscript. You can set it to print that
file however you want.
Given that the :hardcopy command generates postscript, if you need
text, you'd probably be best off figuring out how to pipe the buffer
contents into your print utility, and bypassing the :hardcopy command
entirely.
David
More information about the KPLUG-List
mailing list