mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-26 20:48:08 +11:00
Compare commits
No commits in common. "c6016cd4290f46e3852f8d232f9e8c58a50d7b7b" and "9d4e9ef08dc3b9e831f16380dcf7220e14d4e408" have entirely different histories.
c6016cd429
...
9d4e9ef08d
14
blk/122
14
blk/122
@ -1,16 +1,12 @@
|
|||||||
'H' goes to the beginning of the line, 'L' to the end.
|
'H' goes to the beginning of the line, 'L' to the end.
|
||||||
|
|
||||||
'w' moves forward by a word. 'b' moves backward by a word.
|
'w' moves forward by a word. 'W' moves backward by a word.
|
||||||
'W' moves to end-of-word. 'B' moves backward to end-of-word.
|
|
||||||
|
|
||||||
'I', 'F' and 'E' invoke the corresponding command from the
|
'I', 'F' and 'E' invoke the corresponding command from the
|
||||||
Block Editor (B100). Refer to documentation there.
|
Block Editor (B100). Refer to documentation there.
|
||||||
|
|
||||||
'f' puts the contents of your previous cursor movement into the
|
'X' deletes "modifier" characters following cursor.
|
||||||
find buffer. If that movement was a forward movement, it brings
|
|
||||||
the cursor back where it was. This allows for an efficient
|
|
||||||
combination of movements and 'E'. For example, if you want to
|
|
||||||
delete the next word, you type 'w', then 'f', then check your
|
|
||||||
"F" buffer to be sure, then press 'E'.
|
|
||||||
|
|
||||||
'X' deletes "modifier" characters following cursor. (cont.)
|
'R' goes into replace mode at current cursor position.
|
||||||
|
Following keystrokes replace current character and advance
|
||||||
|
cursor. Press return to return to normal mode.
|
||||||
|
4
blk/123
4
blk/123
@ -1,4 +0,0 @@
|
|||||||
'R' goes into replace mode at current cursor position.
|
|
||||||
Following keystrokes replace current character and advance
|
|
||||||
cursor. Press return to return to normal mode.
|
|
||||||
|
|
2
blk/125
2
blk/125
@ -1,3 +1,3 @@
|
|||||||
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
||||||
-23 LOAD+ ( B102, block editor )
|
-23 LOAD+ ( B102, block editor )
|
||||||
1 5 LOADR+
|
1 4 LOADR+
|
||||||
|
3
blk/126
3
blk/126
@ -1,5 +1,4 @@
|
|||||||
CREATE CMD 2 C, '$' C, 0 C,
|
CREATE CMD 2 C, '$' C, 0 C,
|
||||||
VARIABLE PREVPOS
|
|
||||||
: 0acc 0 ACC ! ;
|
: 0acc 0 ACC ! ;
|
||||||
: acc@ ACC @ 1 MAX 0acc ;
|
: acc@ ACC @ 1 MAX 0acc ;
|
||||||
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
||||||
@ -11,5 +10,3 @@ VARIABLE PREVPOS
|
|||||||
: contents 3 aty BLK> @ LIST ;
|
: contents 3 aty BLK> @ LIST ;
|
||||||
: selblk BLK@ contents ;
|
: selblk BLK@ contents ;
|
||||||
: mode! ( c -- ) 63 0 AT-XY ;
|
: mode! ( c -- ) 63 0 AT-XY ;
|
||||||
: pos! EDPOS @ PREVPOS !
|
|
||||||
1023 MIN DUP 0< IF DROP 0 THEN EDPOS ! ;
|
|
||||||
|
7
blk/127
7
blk/127
@ -1,6 +1,7 @@
|
|||||||
: setpos EDPOS @ 64 /MOD
|
: setpos EDPOS @ 64 /MOD
|
||||||
3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
||||||
: cmv ( n -- , char movement ) acc@ * EDPOS @ + pos! ;
|
: pos+ EDPOS @ + 1024 MOD EDPOS ! ;
|
||||||
|
: cmv ( n -- , char movement ) acc@ * pos+ ;
|
||||||
: $; 0acc ;
|
: $; 0acc ;
|
||||||
: $g ACC @ selblk 0acc ;
|
: $g ACC @ selblk 0acc ;
|
||||||
: $[ BLK> @ acc@ - selblk ;
|
: $[ BLK> @ acc@ - selblk ;
|
||||||
@ -10,5 +11,5 @@
|
|||||||
: $E E contents ;
|
: $E E contents ;
|
||||||
: $X acc@ X contents ;
|
: $X acc@ X contents ;
|
||||||
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
||||||
: $H 0acc EDPOS @ 0x3c0 AND pos! ;
|
: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ;
|
||||||
: $L 0acc EDPOS @ 0x3f OR pos! ;
|
: $L 0acc EDPOS @ 0x3f OR EDPOS ! ;
|
||||||
|
19
blk/128
19
blk/128
@ -1,12 +1,15 @@
|
|||||||
: $w EDPOS @ BLK( + acc@ 0 DO
|
: $w EDPOS @ BLK( + acc@ 0 DO
|
||||||
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
|
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
|
||||||
1- BLK( - pos! ;
|
1- BLK( - 1023 MIN EDPOS ! ;
|
||||||
: $W EDPOS @ BLK( + acc@ 0 DO
|
: $W EDPOS @ BLK( + acc@ 0 DO
|
||||||
1+ BEGIN C@+ WS? NOT UNTIL BEGIN C@+ WS? UNTIL LOOP
|
|
||||||
2- BLK( - pos! ;
|
|
||||||
: $b EDPOS @ BLK( + acc@ 0 DO
|
|
||||||
1- BEGIN C@- WS? NOT UNTIL BEGIN C@- WS? UNTIL LOOP
|
|
||||||
2+ BLK( - pos! ;
|
|
||||||
: $B EDPOS @ BLK( + acc@ 0 DO
|
|
||||||
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
||||||
1+ BLK( - pos! ;
|
1+ BLK( - DUP 0< IF DROP 0 THEN EDPOS ! ;
|
||||||
|
: $R ( replace mode )
|
||||||
|
mode! 'R' EMIT
|
||||||
|
BEGIN setpos C< DUP 0xd = NOT IF
|
||||||
|
EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
||||||
|
THEN UNTIL mode! SPC contents ;
|
||||||
|
: handle ( c -- f )
|
||||||
|
DUP '0' '9' =><= IF num 0 EXIT THEN
|
||||||
|
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
||||||
|
UPPER 'Q' = ;
|
||||||
|
26
blk/129
26
blk/129
@ -1,13 +1,13 @@
|
|||||||
: $f EDPOS @ PREVPOS @ 2DUP = IF 2DROP EXIT THEN
|
: bufp ( buf -- )
|
||||||
2DUP > IF DUP pos! SWAP THEN
|
DUP 64 + SWAP DO
|
||||||
( p1 p2, p1 < p2 ) OVER - 64 MIN ( pos len ) FBUF _zbuf
|
i C@ DUP 0x20 < IF DROP 0x20 THEN EMIT
|
||||||
SWAP _cpos FBUF ( len src dst ) ROT MOVE ;
|
LOOP ;
|
||||||
: $R ( replace mode )
|
: bufs
|
||||||
mode! 'R' EMIT
|
1 aty ." I: " IBUF bufp
|
||||||
BEGIN setpos C< DUP 0xd = NOT IF
|
2 aty ." F: " FBUF bufp ;
|
||||||
EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
|
||||||
THEN UNTIL mode! SPC contents ;
|
: VE ['] c<over 0x08 ( C< override ) RAM+ !
|
||||||
: handle ( c -- f )
|
clrscr 0acc 0 EDPOS ! contents
|
||||||
DUP '0' '9' =><= IF num 0 EXIT THEN
|
BEGIN status bufs setpos KEY handle UNTIL
|
||||||
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
0 0x08 RAM+ ! 19 aty ;
|
||||||
UPPER 'Q' = ;
|
|
||||||
|
13
blk/130
13
blk/130
@ -1,13 +0,0 @@
|
|||||||
: bufp ( buf -- )
|
|
||||||
DUP 64 + SWAP DO
|
|
||||||
i C@ DUP 0x20 < IF DROP 0x20 THEN EMIT
|
|
||||||
LOOP ;
|
|
||||||
: bufs
|
|
||||||
1 aty ." I: " IBUF bufp
|
|
||||||
2 aty ." F: " FBUF bufp ;
|
|
||||||
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
|
|
||||||
: VE ['] c<over 0x08 ( C< override ) RAM+ !
|
|
||||||
clrscr 0acc 0 EDPOS ! 0 PREVPOS ! contents
|
|
||||||
BEGIN status bufs setpos KEY handle UNTIL
|
|
||||||
0 0x08 RAM+ ! 19 aty ;
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user