ed and VE: add command Y

This commit is contained in:
Virgil Dupras 2020-06-10 17:27:14 -04:00
parent 8f0e51a21c
commit bc951a5ff1
5 changed files with 8 additions and 5 deletions

View File

@ -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.)

2
blk/102 Normal file
View File

@ -0,0 +1,2 @@
X ( n -- ): Delete X chars after cursor and place in IBUF.
E: Run X with n = length of FBUF.

View File

@ -8,4 +8,4 @@
SWAP 0 FILL
EDPOS @ 64 / _pln ;
: E FBUF _blen X ;
: Y FBUF _blen icpy ;

View File

@ -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.

View File

@ -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 ;