mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 03:30:55 +11:00
9ab5cda397
Shadowing core "I" is too messy. As soon as ed is loaded in memory, nothing else that isn't "i-aware" can be loaded anymore. I guess that's why "contexts" exist in Starting Forth, but adding this concept just for allowing the shadowing of core words seems overkill to me. Renaming I to i in ed seems better.
17 lines
741 B
Plaintext
17 lines
741 B
Plaintext
There are two buffers, IBUF (insert buffer) and FBUF (find
|
|
buffer). They are used as a typing target for the actions
|
|
described below. They both have a peculiar logic: when typing
|
|
is expected to fill a buffer, an empty value means "reuse
|
|
previous value". For example, typing "I foo I " inserts
|
|
"foofoo".
|
|
|
|
T ( n -- ): select line n for editing.
|
|
P xxx: put typed IBUF on selected line.
|
|
U xxx: insert typed IBUF on selected line.
|
|
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" is to avoid shadowing
|
|
core word "I".
|
|
Y: Copy n characters after cursor into IBUF, n being length of
|
|
FBUF. (cont.)
|