= p command
.specify destination of m(Move),c(Copy) line command
it is not used as destination of COPy,MOVe command to copy the external file.
.source line text is inserted into the destination line if char-Ins mode,
overwrite the destination line if char-Rep mode(toggled by Ins key).
.if cursor is on the line of destination specified,
Insert/Replace start at the position.
.n,b,s parameter pattern
pn : copy n times full set of source lines.
pn.s : copy full set of source lines then skip s lines,
repeat that n times.
p,b.s : get and copy b lines from source then skip s lines,
repeat that until source is exhausted.
pn,b.s : get and copy b lines from source then skip s lines,
repeat that n times(break if source is exhausted).
for p[n][,b][.s] pattern,operation break if copy source is exhaused
but for pp-pp[,b][.s] pattern,operation continues until
all target lines are pasted wrapping to the top of source lines.
.n is not supported for xx-xx pattern.
(1) x[n] pattern
.when cursor is out of file text area.
cc | a
0002000| bbb
0003000| ccccc
cc | ddddddd
0005000|
p |AAAAAAAAAAAA
0007000|BBBBBBBBBBBB
0008000|CCCCCCCCCCCC
0009000|DDDDDDDDDDDD
0010000|EEEEEEEEEEEE
===>
result of Rep mode
0001000| a
0002000| bbb
0003000| ccccc
0004000| ddddddd
0005000|
0006000* aAAAAAAA
0007000* bbbBBBBBB
0008000* cccccCCCCC
0009000* dddddddDDDD
0010000|EEEEEEEEEEEE
result of Ins mode
0001000| a
0002000| bbb
0003000| ccccc
0004000| ddddddd
0005000|
0006000* aAAAAAAAAAAAA
0007000* bbbBBBBBBBBBBBB
0008000* cccccCCCCCCCCCCCC
0009000* dddddddDDDDDDDDDDDD
0010000|EEEEEEEEEEEE
.when cursor is on the text area of the destination specification line.
cc | a
0002000| bbb
0003000| ccccc
cc | ddddddd
0005000|
0006000|AAAAAAAAAAAA
p |BBBBBBBBxBBB
0008000|CCCCCCCCCCCC
0009000|DDDDDDDDDDDD
0010000|EEEEEEEEEEEE
===>
result of Rep mode
0001000| a
0002000| bbb
0003000| ccccc
0004000| ddddddd
0005000|
0006000|AAAAAAAAAAAA
0007000*BBBBBBBB a
0008000*CCCCCCCC bbb
0009000*DDDDDDDD ccccc
0010000*EEEEEEEE ddddddd
0011000|FFFFFFFFFFFF
result of Ins mode
0001000| a
0002000| bbb
0003000| ccccc
0004000| ddddddd
0005000|
0006000|AAAAAAAAAAAA
0007000*BBBBBBBB axBBB
0008000*CCCCCCCC bbbCCCC
0009000*DDDDDDDD cccccDDDD
0010000*EEEEEEEE dddddddEEEE
0011000|FFFFFFFFFFFF
(following samples are for the case of Rep mode and cursor is on lineno column)
.case of with repeat count.
cc | a
0002000| bbb
cc | ccccc
0004000|
p3 |AAAAAAAAAAAA
0006000|BBBBBBBBBBBB
0007000|CCCCCCCCCCCC
0008000|DDDDDDDDDDDD
0009000|EEEEEEEEEEEE
0010000|FFFFFFFFFFFF
0011000|GGGGGGGGGGGG
0012000|HHHHHHHHHHHH
*******|********** END OF FILE ************************
===>
0001000| a
0002000| bbb
0003000| ccccc
0004000|
r1 0005000* aAAAAAAA
0006000* bbbBBBBBB
0007000* cccccCCCCC
r2 0008000* aDDDDDDD
0009000* bbbEEEEEE
0010000* cccccFFFFF
r3 0011000* aGGGGGGG
0012000* bbbHHHHHH
*******|********** END OF FILE ************************
(2) xn.s pattern
.repeat 3 times fullset paste skipping intermediate 2 line.
cc | 1
0002000| 2
0003000| 3
cc | 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
p3.2 |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
0021000|KKKKKKKKKKKK
0022000|LLLLLLLLLLLL
0023000|MMMMMMMMMMMM
0024000|NNNNNNNNNNNN
0025000|OOOOOOOOOOOO
0026000|PPPPPPPPPPPP
0027000|QQQQQQQQQQQQ
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
r1 0011000* 1AAAAAAAAAA
0012000* 2BBBBBBBBBB
0013000* 3CCCCCCCCCC
0014000* 4DDDDDDDDDD
s1 0015000|EEEEEEEEEEEE
s2 0016000|FFFFFFFFFFFF
r2 0017000* 1GGGGGGGGGG
0018000* 2HHHHHHHHHH
0019000* 3IIIIIIIIII
0020000* 4JJJJJJJJJJ
s1 0021000|KKKKKKKKKKKK
s2 0022000|LLLLLLLLLLLL
r3 0023000* 1MMMMMMMMMM
0024000* 2NNNNNNNNNN
0025000* 3OOOOOOOOOO
0026000* 4PPPPPPPPPP
0027000|QQQQQQQQQQQQ
(3) x,b.s pattern
.paste each 3 lines then skip 2 line at destination,
repeat that until source lines are exhausted.
cc | 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
cc | 0
p,3.2 |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
0021000|KKKKKKKKKKKK
0022000|LLLLLLLLLLLL
0023000|MMMMMMMMMMMM
0024000|NNNNNNNNNNNN
0025000|OOOOOOOOOOOO
0026000|PPPPPPPPPPPP
0027000|QQQQQQQQQQQQ
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
rr b1 0011000* 1AAAAAAAAAA
b2 0012000* 2BBBBBBBBBB
b3 0013000* 3CCCCCCCCCC
s1 0014000|DDDDDDDDDDDD
s2 0015000|EEEEEEEEEEEE
rr b1 0016000* 4FFFFFFFFFF
b2 0017000* 5GGGGGGGGGG
b3 0018000* 6HHHHHHHHHH
s1 0019000|IIIIIIIIIIII
s2 0020000|JJJJJJJJJJJJ
rr b1 0021000* 7KKKKKKKKKK
b2 0022000* 8LLLLLLLLLL
b3 0023000* 9MMMMMMMMMM
s1 0024000|NNNNNNNNNNNN
s2 0025000|OOOOOOOOOOOO
rr b1 0026000* 0PPPPPPPPPP
0027000|QQQQQQQQQQQQ
(4) xn,b.s pattern
.paste each 2 lines then skip 1 line at destination,
repeat that 3 times.
cc | 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
cc | 0
p3,2.1 |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
0021000|KKKKKKKKKKKK
0022000|LLLLLLLLLLLL
0023000|MMMMMMMMMMMM
0024000|NNNNNNNNNNNN
0025000|OOOOOOOOOOOO
0026000|PPPPPPPPPPPP
0027000|QQQQQQQQQQQQ
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
r1 b1 0011000* 1AAAAAAAAAA
b2 0012000* 2BBBBBBBBBB
s1 0013000|CCCCCCCCCCCC
r2 b1 0014000* 3DDDDDDDDDD
b2 0015000* 4EEEEEEEEEE
s1 0016000|FFFFFFFFFFFF
r3 b1 0017000* 5GGGGGGGGGG
b2 0018000* 6HHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
(5) xx-xx pattern
.fill destination lines.(use source repeatedly)
cc | 1
0002000| 2
0003000| 3
cc | 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
pp |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
pp |IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
rr c1 0011000* 1AAAAAAAAAA
c2 0012000* 2BBBBBBBBBB
c3 0013000* 3CCCCCCCCCC
c4 0014000* 4DDDDDDDDDD
rr c1 0015000* 1EEEEEEEEEE
c2 0016000* 2FFFFFFFFFF
c3 0017000* 3GGGGGGGGGG
c4 0018000* 4HHHHHHHHHH
rr c1 0019000* 1IIIIIIIIII
0020000|JJJJJJJJJJJJ
(6) xx-xx.s pattern
.paste fullset of source until fill destination range
with intermediate 2 lines skip.
cc | 1
0002000| 2
0003000| 3
cc | 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
pp.2 |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
0021000|KKKKKKKKKKKK
0022000|LLLLLLLLLLLL
pp |MMMMMMMMMMMM
0024000|NNNNNNNNNNNN
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
rr c1 0011000* 1AAAAAAAAAA
c2 0012000* 2BBBBBBBBBB
c3 0013000* 3CCCCCCCCCC
c4 0014000* 4DDDDDDDDDD
s1 0015000|EEEEEEEEEEEE
s2 0016000|FFFFFFFFFFFF
rr c1 0017000* 1GGGGGGGGGG
c2 0018000* 2HHHHHHHHHH
c3 0019000* 3IIIIIIIIII
c4 0020000* 4JJJJJJJJJJ
s1 0021000|KKKKKKKKKKKK
s2 0022000|LLLLLLLLLLLL
rr c1 0023000* 1MMMMMMMMMM
0024000|NNNNNNNNNNNN
(7) xx-xx,b.s pattern
.paste each 3 lines from source lineset then skip 2 lines
at destination,repeat that until fill destination range.
if source exhausted,wrap to top of source then continues.
cc | 1
0002000| 2
0003000| 3
cc | 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
pp,3 |AAAAAAAAAAAA
0012000|BBBBBBBBBBBB
0013000|CCCCCCCCCCCC
0014000|DDDDDDDDDDDD
0015000|EEEEEEEEEEEE
0016000|FFFFFFFFFFFF
0017000|GGGGGGGGGGGG
0018000|HHHHHHHHHHHH
0019000|IIIIIIIIIIII
0020000|JJJJJJJJJJJJ
0021000|KKKKKKKKKKKK
0022000|LLLLLLLLLLLL
pp.2 |MMMMMMMMMMMM
0024000|NNNNNNNNNNNN
===>
0001000| 1
0002000| 2
0003000| 3
0004000| 4
0005000| 5
0006000| 6
0007000| 7
0008000| 8
0009000| 9
0010000| 0
rr b1 0011000* 1AAAAAAAAAA
b2 0012000* 2BBBBBBBBBB
b3 0013000* 3CCCCCCCCCC
s1 0014000|DDDDDDDDDDDD
s2 0015000|EEEEEEEEEEEE
rr b1 0016000* 4FFFFFFFFFF
b2 0017000* 1GGGGGGGGGG
b3 0018000* 2HHHHHHHHHH
s1 0019000|IIIIIIIIIIII
s2 0020000|JJJJJJJJJJJJ
rr b1 0021000* 3KKKKKKKKKK
b2 0022000* 4LLLLLLLLLL
b3 0023000* 1MMMMMMMMMM
0024000|NNNNNNNNNNNN