[comp.editors] How to do this in VI....

abed@venus.wustl.edu (Abed M. Hammoud) (04/30/91)

	Hello, 

	Is there a way to pipe out the content of a buffer in Vi
	to the printer.

	So for example this would allow me to select part of the 
	screen, save it in lets say the a buffer. and then print
	the contents of the buffer.

	I tried to write the contents of the buffer to a /tmp file
	and then print the file but it didn't work good...

	Please help, any comments are appreciated...

	No flames Please...

	A VI fan.....

-------------------------------------------------------------------------
Abed M. Hammoud					 | abed@saturn.wustl.edu
Washington University.				 | Office (314) 726-7547
Electronic Systems & Signals Research Laboratory.| 
Department of Electrical/Biomedical Engineering. |
St. Louis, MO , 63130 USA			 |
-------------------------------------------------------------------------

rouben@math9.math.umbc.edu (Rouben Rostamian) (04/30/91)

In article <1991Apr30.152450.18717@cec1.wustl.edu> abed@venus.wustl.edu (Abed M. Hammoud) writes:
>	Is there a way to pipe out the content of a buffer in Vi
>	to the printer.
>	So for example this would allow me to select part of the 
>	screen, save it in lets say the a buffer. and then print
>	the contents of the buffer.

To send a portion of your buffer to the printer, mark the beginning
of range, say by m, go to the end of the range, and type
    :'m,.w !lpr

You may have to replace the "lpr" command with whatenver command
your system uses to send files to printers.

--
Rouben Rostamian                          Telephone: (301) 455-2458
Department of Mathematics and Statistics  e-mail:
University of Maryland Baltimore County   bitnet: rostamian@umbc.bitnet
Baltimore, MD 21228,  U.S.A.              internet: rouben@math9.math.umbc.edu

lutwak@athena.mit.edu (Robert Lutwak) (05/02/91)

In article <1991Apr30.152450.18717@cec1.wustl.edu> abed@venus.wustl.edu (Abed M. Hammoud) writes:
>	Is there a way to pipe out the content of a buffer in Vi
>	to the printer.
>
	I don't know about a buffer, but I often do:

:.,.+n w !lp

where n is some number of lines that I want to print.