HP 3000 Manuals

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


HP EDIT Reference Manual

Cut To Buffer 

Purpose 

Deletes selected text and moves it to the Cut/Paste buffer.

Default Syntax 

[n] C

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

Description 

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

Removal Process 

When you execute this command, HP EDIT removes 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 Cut To Buffer command
       again or the Copy To Buffer command

Buffer Alteration 

The buffer contents change when you execute the Cut To Buffer command
again and place [REV DEL] text in the buffer.  Each time you use this
command, HP EDIT writes over the original buffer contents if you pasted
any cut text before executing 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 contents 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.

Removal Methods 

There are two methods of removing text and placing it in the Cut/Paste
buffer.  You can either:

   *   Type a count representing the number of lines to cut and then
       execute the command.

            or 
       [REV BEG]

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

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

Procedure 
[REV BEG]

To cut lines into the buffer using a count:[REV END]

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

   2.  Type a count representing the number of lines you want to cut and
       place in the Cut/Paste buffer.  If the count is greater than the
       number of lines remaining in the file, HP EDIT only cuts the
       remaining lines.

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

[REV BEG]

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

   1.  Select the block of text you want to cut into the buffer.

   2.  Press the C key, or press the Cut/Paste function key, followed by
       the Cut Lines function key.  HP EDIT removes the text and displays
       X lines in cut/paste buffer on the message line, where X equals
       the number of lines specified as the count.
[REV END]

Example 

To cut the following lines and place them in the Cut/Paste buffer: 

           These two lines will be cut into the Cut/Paste buffer.
           The lines will disappear 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 removes the two lines from the file,
       places them in the Cut/Paste buffer, and displays the following
       message:

            2 lines in cut/paste buffer

Related Commands 

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



MPE/iX 5.0 Documentation