forked from CCurl/c4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
block-025.fth
32 lines (25 loc) · 1.43 KB
/
block-025.fth
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
vhere const ctrl-cases
key-up case mv-up key-down case mv-dn 127 case mv-lt
key-left case mv-lt key-right case mv-rt 8 case mv-lt
key-end case mv-end key-cend case mv-end! 9 case mv-tab-r
key-home case mv-home key-chome case mv-home! 17 case mv-tab-l
key-pgup case next-blk key-pgdn case prev-blk 13 case mv-cr
key-ins case insert-toggle key-del case delete-char 24 case delete-prev
3 case normal-mode!
end-cases
vhere const ed-cases
'k' case mv-up 'h' case mv-lt 'j' case mv-dn 'l' case mv-rt
32 case mv-rt '_' case mv-home 'q' case mv-tab-r 'Q' case mv-tab-l
'R' case replace-mode! 'r' case replace-one '$' case mv-end
'i' case insert-mode! 'b' case! 32 insert-char mv-lt ; '#' case! cls show! ;
':' case do-cmd '!' case! ->cmd cmd-buf outer ; 'D' case yank/del
'x' case delete-char 'X' case delete-prev
'J' case join-lines 'Y' case yank-line
'p' case put-line 'P' case! mv-dn put-line ; 'A' case! mv-end insert-mode! ;
'-' case next-blk '+' case prev-blk 'C' case! row col clear-eol ;
'o' case! 1 open-line ; 'O' case! 0 open-line ;
end-cases
: ed-key ( ch-- ) dup 32 126 btwi if0 ctrl-cases switch exit then
insert-mode? if insert-char exit then
replace-mode? if replace-char exit then
ed-cases switch ;