VE: add W and S movements
This commit is contained in:
parent
77aedd7338
commit
11843cc613
2
blk/121
2
blk/121
@ -13,4 +13,4 @@ saved beforehand.
|
|||||||
';' resets the modifier
|
';' resets the modifier
|
||||||
|
|
||||||
H and L move the cursor by "modifier" characters. J and K, by
|
H and L move the cursor by "modifier" characters. J and K, by
|
||||||
lines.
|
lines. (cont.)
|
||||||
|
2
blk/125
2
blk/125
@ -1,2 +1,2 @@
|
|||||||
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
||||||
1 2 LOADR+
|
1 3 LOADR+
|
||||||
|
14
blk/127
14
blk/127
@ -1,4 +1,5 @@
|
|||||||
: setpos POS @ 64 /MOD 1+ ( status line ) AT-XY ;
|
: setpos POS @ 64 /MOD
|
||||||
|
1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
||||||
: pos+ POS @ + 1024 MOD POS ! ;
|
: pos+ POS @ + 1024 MOD POS ! ;
|
||||||
: cmv ( n -- , char movement ) acc@ * pos+ ;
|
: cmv ( n -- , char movement ) acc@ * pos+ ;
|
||||||
: $; 0acc ;
|
: $; 0acc ;
|
||||||
@ -6,10 +7,7 @@
|
|||||||
: $[ BLK> @ acc@ - selblk ;
|
: $[ BLK> @ acc@ - selblk ;
|
||||||
: $] BLK> @ acc@ + selblk ;
|
: $] BLK> @ acc@ + selblk ;
|
||||||
: $H -1 cmv ; : $L 1 cmv ; : $K -64 cmv ; : $J 64 cmv ;
|
: $H -1 cmv ; : $L 1 cmv ; : $K -64 cmv ; : $J 64 cmv ;
|
||||||
: handle ( c -- f )
|
: $W POS @ BLK( + BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL
|
||||||
UPPER DUP '0' '9' =><= IF num 0 EXIT THEN
|
1- BLK( - 1023 MIN POS ! ;
|
||||||
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
: $S POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
|
||||||
'Q' = ;
|
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;
|
||||||
: VE clrscr 0acc 0 POS ! contents
|
|
||||||
BEGIN status setpos KEY handle UNTIL 18 aty ;
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user