J - Join

Joins copies of one or more lines to the current line.

Syntax

J{m}{/string}
J{m-k}{/string}
J{m,n}{/string}

Syntax Elements

m is the number of lines to join string to, beginning with the current line. If m is not specified, it defaults to the current line.

m -k is line m through line k.

m ,n is n lines, starting at line m.

/ is a separator. You can use another character if '/' is used in the string to be appended.

string is the bridging character string.

Comments

You have the option of including a character string between the joined lines.

If you specify J with no parameters, the line following the current line is copied to the current line, leaving the line copied as it was.

Example 1

:ED BP ABC
Top
.P
001 AAA
002 BBB
003 CCC
004 DDD
EOI 004
.T
Top
.J2,3
002 BBBCCCDDD
.F
Top
.P
001 AAA
002 BBBCCCDDD
EOI 002




Current contents of item ABC







Join lines 3 and 4 to line 2.




New contents of item ABC.

Example 2

:ED BP ABC
Top
.P
001 AAA
002 BBB
003 CCC
004 DDD
EOI 004
.T
Top
.J2-3/TEXTSTRG
002 BBBTEXTSTRGCCC
.F
Top
.P
001 AAA
002 BBBTEXTSTRGCCC
003 DDD
EOI 003


Current contents of item ABC.








Join line 3 to line 2, with the literal string TEXTSTRG sandwiched between the joined lines.



New contents of item ABC