HP 3000 Manuals

Copy To Buffer [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Copy To Buffer 

Purpose 

Copies selected text to the Cut/Paste buffer.

Default Syntax 

[n] c

where n is a count that represents the number of lines to copy beginning
at the cursor line.  The default value of n is 1.

Description 

This command copies [REV BEG]text[REV END] to the Cut/Paste buffer.  The
command is used in conjunction with the Paste Before and Paste After
commands to copy a segment of text to another location in a file.

Copy Process 

When you execute this command, HP EDIT copies the specified lines [REV
BEG]or characters[REV END] and places them in the Cut/Paste buffer.  You
can then insert the buffer contents into text using one of the paste
commands (Paste After, Paste Before, Paste Over).  The buffer contents
remain intact until you do one of the following:

   *   Terminate the session.

   *   Write over the contents by executing the Copy To Buffer command
       again or the Cut To Buffer command.

Buffer Alteration 

The buffer contents change if you execute the Copy To Buffer command
again and copy new lines of text to the buffer.  Each time you use this
command, HP EDIT writes over the current buffer contents if you pasted
any cut text before issuing the command.

If you did not execute a paste command after using either the Cut To
Buffer or Cut And Append To Buffer command, HP EDIT asks you whether you
want to clear the buffer.  This is a precautionary measure to prevent the
buffer from being inadvertently replaced before it has been pasted in the
file.  If you reply yes to the prompt, the current buffer contents are
replaced with the new text.  If you reply no to the prompt, the current
buffer contents remain intact and the command aborts.

Copy Methods 

There are two methods of copying text to the Cut/Paste buffer.  You can
either:

   *   Type a count representing the number of lines to copy and then
       execute the Copy to Buffer command.

            or 
       [REV BEG]

   *   Select a character block or a line block, then execute the Copy to
       Buffer command.[REV END]

The second method is recommended if the [REV BEG]portion of text[REV END]
you want to copy is not readily apparent.

Procedures 

To copy lines to the buffer using the manual count method: 

   1.  Move the cursor to a column anywhere on the first line of the
       group of lines to be copied.

   2.  Type a count that represents the number of lines you want to copy
       to the Cut/Paste buffer.

   3.  Press the c key, or press the Cut/Paste function key, followed by
       the Copy Lines function key.  HP EDIT displays X lines in 
       Cut/Paste buffer on the message line, where X equals the number of
       lines specified as the count, or the number of lines remaining in
       the file.

[REV BEG]

To copy text into the buffer using line or character blocks: 

   1.  Select the block of text you want to copy to the buffer.

   2.  Press the c key, or press the Cut/Paste function key, followed by
       the Copy Lines function key.  HP EDIT displays X lines in 
       Cut/Paste buffer on the message line.  X equals the number of
       lines in the selected block of text.
[REV END]

Example 

To copy the following lines to the Cut/Paste buffer: 

           These two lines will be copied to the Cut/Paste buffer.
           The lines will be unaltered after the command is issued.

   1.  Move the cursor to a column anywhere on the first line.

   2.  Type the number 2 as the count.

   3.  Press the c key.  HP EDIT copies the two lines to the Cut/Paste
       buffer and displays the following response on the message line:

            2 lines in cut/paste buffer

Related Commands 

       Copy And Append To Buffer
       Cut To Buffer
       Cut And Append To Buffer
       Paste After
       Paste Before
       Paste Over



MPE/iX 5.0 Documentation