K - Kopy lines to buffer.

Syntax:

K(bufname)

Examples:

k(buf1)
*k(xyz)
1,3ka

Description:

K moves one or more lines from the current buffer into the specified buffer, then copies the same lines back into the current buffer. Since this is not exactly the same as copying one buffer into another, we call it a Kopy operation. Whatever used to be in buffer (bufname) is destroyed in the Kopying process.

The effect of K is almost the same as copying the lines into the named buffer. However, something special happens when a line in the current buffer does not end with a new-line character. When such a line and the line following it are moved into (bufname), they remain two distinct lines. However, when they are copied back to the current buffer, the copying process will join the two into a single line. Thus K is a convenient way to "clean up" a buffer if it has lines that do not end with new-lines.

If you do not specify an address, K just Kopies the current line. If you specify one address, K copies that line instead of the current one. If you specify two addresses, K copies all the lines between and including the two addresses. In this case, the first address must precede the second.

When K is finished, FRED sets "." in buffer (bufname) the last line of the buffer, and sets "." in the current buffer to the last line Kopied.

Copyright © 1998, Thinkage Ltd.