From bc951a5ff1f451023caa09fa68f23ac6bd127799 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 10 Jun 2020 17:27:14 -0400 Subject: [PATCH] ed and VE: add command Y --- blk/101 | 4 ++-- blk/102 | 2 ++ blk/112 | 2 +- blk/122 | 4 ++-- blk/128 | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 blk/102 diff --git a/blk/101 b/blk/101 index dd5aa0d..0365c29 100644 --- a/blk/101 +++ b/blk/101 @@ -12,5 +12,5 @@ F xxx: find typed FBUF in block, starting from current position+1. If not found, don't move. I xxx: insert typed IBUF at cursor. "I" shadows core word. Use "i" to access it. -X ( n -- ): Delete X chars after cursor and place in IBUF. -E: Run X with n = length of FBUF. +Y: Copy n characters after cursor into IBUF, n being length of + FBUF. (cont.) diff --git a/blk/102 b/blk/102 new file mode 100644 index 0000000..e2622bc --- /dev/null +++ b/blk/102 @@ -0,0 +1,2 @@ +X ( n -- ): Delete X chars after cursor and place in IBUF. +E: Run X with n = length of FBUF. diff --git a/blk/112 b/blk/112 index bd04da6..80b279b 100644 --- a/blk/112 +++ b/blk/112 @@ -8,4 +8,4 @@ SWAP 0 FILL EDPOS @ 64 / _pln ; : E FBUF _blen X ; - +: Y FBUF _blen icpy ; diff --git a/blk/122 b/blk/122 index db94baf..9098f30 100644 --- a/blk/122 +++ b/blk/122 @@ -6,8 +6,8 @@ 'w' moves forward by "modifier" words. 'b' moves backward. 'W' moves to end-of-word. 'B', backwards. -'I', 'F', 'X' and 'E' invoke the corresponding command from the -Block Editor (B100). Refer to documentation there. +'I', 'F', 'Y', 'X' and 'E' invoke the corresponding command +from the Block Editor (B100). Refer to documentation there. 'o' inserts a blank line after the cursor. 'O', before. diff --git a/blk/128 b/blk/128 index 4087629..cf85c90 100644 --- a/blk/128 +++ b/blk/128 @@ -3,6 +3,7 @@ : $] BLK> @ acc@ + selblk ; : $I mode! 'I' EMIT IBUF 1 buftype _I contents mode! SPC ; : $F mode! 'F' EMIT FBUF 2 buftype _F setpos mode! SPC ; +: $Y Y ; : $E E contents ; : $X acc@ X contents ; : $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;