PipalTextEditor.tip
Stolen from Tioga.tip
Barth, February 4, 1988 2:23:51 pm PST
OPTIONS
Fast,
PrintKeys;
Miscellaneous macro definitions to standardize certain conventions
[DEF,ClickTime,(200)]
[DEF,DownClick,(~1 Down BEFORE [ClickTime])]
[DEF,UpClick,(~1 Up BEFORE [ClickTime])]
[DEF,Click,([UpClick,~1] AND [DownClick,~1])]
[DEF,BothUp,(~1 Up WHILE ~2 Up)]
[DEF,WhileThreeUp,
(WHILE ~1 Up WHILE ~2 Up WHILE ~3 Up)]
[DEF,FourUp,(~1 Up WHILE ~2 Up WHILE ~3 Up WHILE ~4 Up)]
[DEF,WhileFiveUp,
(WHILE ~1 Up WHILE ~2 Up WHILE ~3 Up WHILE ~4 Up WHILE ~5 Up)]
[DEF,WhileSixUp,
(WHILE ~1 Up WHILE ~2 Up WHILE ~3 Up WHILE ~4 Up WHILE ~5 Up WHILE ~6 Up)]
[DEF,CTRL,(Ctrl Down | Spare3 Down)]
[DEF,WhileCTRLUp,(WHILE Ctrl Up WHILE Spare3 Up)]
[DEF,WhenCTRLUp,(
Ctrl Up WHILE Spare3 Up ~1 => ~2;
Spare3 Up WHILE Ctrl Up ~1 => ~2)]
[DEF,SHIFT,(LeftShift Down | RightShift Down)]
[DEF,SHIFTUp,[BothUp,LeftShift,RightShift]]
[DEF,WhenSHIFTUp,(
LeftShift Up WHILE RightShift Up ~1 => ~2;
RightShift Up WHILE LeftShift Up ~1 => ~2)]
[DEF,IfShift,(SELECT ENABLE FROM
[SHIFT] => ~1;
ENDCASE => ~2)]
[DEF,IfCtrl,(SELECT ENABLE FROM
[CTRL] => ~1;
ENDCASE => ~2)]
SELECT TRIGGER FROM -- top level trigger select
Mouse buttons and mouse movement
[DEF,Sel,(SELECT ENABLE FROM
[CTRL] => [IfShift,
{ ~2 Coords SelSecondary ToPrimary SelPendDel ~1 },
{ ~2 Coords ToLimbo SelPendDel ~1 }];
[SHIFT] => { ~2 Coords SelSecondary ToPrimary SelNotPendDel ~1 };
ENDCASE => { ~2 Coords SelNotPendDel ~1 })]
[DEF,ClickSel,(SELECT ENABLE FROM
[SHIFT] [WhileCTRLUp] => [Sel,~1,~2 ForceSelNotPendDel];
ENDCASE => [Sel,~1,~2])]
[DEF,MouseClick,(SELECT TRIGGER FROM
[Click,~1] => [ClickSel,~3,~1Mouse];
ENDCASE => [ClickSel,~2,~1Mouse])]
Red Down => [MouseClick,Red,SelChar,SelNode];
Yellow Down => SELECT ENABLE FROM
Red Up => [MouseClick,Yellow,SelWord,SelBranch];
ENDCASE;
[DEF,Extend,(
[IfShift,[Sel,~1 SelStartExtend,BlueMouse],[Sel,~1 SelStartExtend,BlueMouse ForceSelPendDel]])]
Blue Down => SELECT ENABLE FROM
[BothUp,Red,Yellow] => SELECT TRIGGER FROM
[Click,Blue] => SELECT TRIGGER FROM
[Click,Blue] => [Extend,SelExpand];
ENDCASE => [Extend,SelReduce];
ENDCASE => [Extend];
ENDCASE;
Mouse => SELECT ENABLE FROM
Red Down => [Sel,SelUpdate];
Yellow Down => [Sel,SelUpdate];
Blue Down => { Coords SelExtend };
ENDCASE;
[DEF,ButtonUp,(SELECT ENABLE FROM
[SHIFTUp] [WhileCTRLUp] WHILE [BothUp,~1,~2] => SELECT ENABLE FROM
ESC Down => Repeat;
ENDCASE => DoEdit;
ENDCASE)]
Red Up => SELECT ENABLE FROM
Blue Down => [Extend,ForceSelPendDel];
ENDCASE => [ButtonUp,Blue,Yellow];
Yellow Up => SELECT ENABLE FROM
Blue Down WHILE Red Up => [Extend,ForceSelPendDel];
ENDCASE => [ButtonUp,Red,Blue];
Blue Up => [ButtonUp,Red,Yellow];
Shift key Commands
[WhenSHIFTUp,[WhileThreeUp,Red,Yellow,Blue] [WhileCTRLUp],DoEdit];
[WhenCTRLUp,[WhileThreeUp,Red,Yellow,Blue] WHILE [SHIFTUp],DoEdit];
ENDCASE.