aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/fnkeys.tes
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fnkeys.tes')
-rw-r--r--lib/fnkeys.tes151
1 files changed, 89 insertions, 62 deletions
diff --git a/lib/fnkeys.tes b/lib/fnkeys.tes
index d0c0e66..fd6b332 100644
--- a/lib/fnkeys.tes
+++ b/lib/fnkeys.tes
@@ -1,99 +1,126 @@
-! Here we define some reasonable default function key macros.
- Their corresponding command-line editing macros begin with  !
-
-! edit command line to move <n> chars, updating existing move ops !
+!*
+ * Here we define some reasonable default function key macros.
+ * Their corresponding command-line editing macros begin with .
+ *!
+
+!*
+ * Edit command line to move <n> chars, updating existing move ops.
+ * The command line at the time of call looks like: (123C)(M[FOO
+ *!
@#c{{U.c
<-A-("=-D1;' -D>
- .">
- -A-)"= -S(\U.v .,Z-2D 0A-C"=2DQ.v|2D-Q.v'%.c | I(Q.c '
- | I(Q.c '
- "> Q.c\IC) | -Q.c\IR) '
+ .-4"< Oins ' -2A-C"N -2A-R"N Oins ' ' -A-)"N Oins '
+ <R -A-("=1;'>
+ \U.v .-1,Z-2D 0A-R"=-'Q.v%.c 2D
+ !ins!
+ I( Q.c"> Q.c\IC | -Q.c\IR ' I)
}}
-! Make DELETE an ESCAPE surrogate.
- Macro is enabled everywhere. !
-@[DC]{}
-
-! Make SHIFT+DELETE a rubout/re-insert key.
- This reverses the ^G modifier for BACKSPACE.
- The macro is enabled everywhere. !
-@[SDC]{}
-
-! Command line editing macros.
- They are enabled only in the start state (i.e. they
- have no effect in string arguments, etc.). !
+!*
+ * Make DELETE an ESCAPE surrogate.
+ * Macro is enabled everywhere.
+ *!
+@[ DC]{}
+
+!*
+ * Make SHIFT+DELETE a rubout/re-insert key.
+ * This reverses the ^G modifier for BACKSPACE.
+ * The macro is enabled everywhere.
+ *!
+@[ SDC]{}
+
+!*
+ * Command line editing macros.
+ * They are enabled only in the start state (i.e. they
+ * have no effect in string arguments, etc.).
+ *!
@[HOME]{
- .ESLINEFROMPOSITIONESPOSITIONFROMLINEU.p
+ ESLINEFROMPOSITIONESPOSITIONFROMLINE:U.p
Q.pU.l <Q.l-."U 1; ' Q.l-.AU.c Q.c- "N Q.c-9"N Q.lU.p 1; '' %.l>
+ Q.pESGETCOLUMN,4EJ
Q.p-.M#c
}
-@[HOME]{(M[HOME]}
-1U[HOME]
+@[ HOME]{(M[HOME]}
+1U[ HOME]
@[END]{
- .ESLINEFROMPOSITIONESGETLINEENDPOSITION-.M#c
+ ESLINEFROMPOSITIONESGETLINEENDPOSITIONU.p
+ Q.pESGETCOLUMN,4EJ
+ Q.p:-.M#c
}
-@[END]{(M[END]}
-1U[END]
+@[ END]{(M[END]}
+1U[ END]
@[NPAGE]{
- .ESLINEFROMPOSITION+(ESLINESONSCREEN)
+ 0,4EJ
+ ESLINEFROMPOSITION+(ESLINESONSCREEN)
ESPOSITIONFROMLINEU.p
- Q.p"< Z | Q.p '-.M#c
+ Q.p"< Z | Q.p: '-.M#c
}
-@[NPAGE]{(M[NPAGE]}
-1U[NPAGE]
+@[ NPAGE]{(M[NPAGE]}
+1U[ NPAGE]
@[PPAGE]{
- .ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l
- Q.l"< 0 | Q.lESPOSITIONFROMLINE '-.M#c
+ 0,4EJ
+ ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l
+ Q.l"< 0 | Q.lESPOSITIONFROMLINE: '-.M#c
}
-@[PPAGE]{(M[PPAGE]}
-1U[PPAGE]
+@[ PPAGE]{(M[PPAGE]}
+1U[ PPAGE]
@[LEFT]{
- ."=0|-1'M#c
+ ."=0|.-1'U.p
+ Q.pESGETCOLUMN,4EJ
+ Q.p-.M#c
}
-@[LEFT]{(M[LEFT]}
-1U[LEFT]
+@[ LEFT]{(M[LEFT]}
+1U[ LEFT]
@[SLEFT]{
- 0,0,.ESWORDSTARTPOSITIONESWORDSTARTPOSITION-.M#c
+ 0,0,ESWORDSTARTPOSITIONESWORDSTARTPOSITIONU.p
+ Q.pESGETCOLUMN,4EJ
+ Q.p:-.M#c
}
-@[SLEFT]{(M[SLEFT]}
-1U[SLEFT]
+@[ SLEFT]{(M[SLEFT]}
+1U[ SLEFT]
@[RIGHT]{
- .-Z"=0|1'M#c
+ .-Z"=.|.+1'U.p
+ Q.pESGETCOLUMN,4EJ
+ Q.p-.M#c
}
-@[RIGHT]{(M[RIGHT]}
-1U[RIGHT]
+@[ RIGHT]{(M[RIGHT]}
+1U[ RIGHT]
@[SRIGHT]{
- 0,0,.ESWORDENDPOSITIONESWORDENDPOSITION-.M#c
+ 0,0,ESWORDENDPOSITIONESWORDENDPOSITIONU.p
+ Q.pESGETCOLUMN,4EJ
+ Q.p:-.M#c
}
-@[SRIGHT]{(M[SRIGHT]}
-1U[SRIGHT]
+@[ SRIGHT]{(M[SRIGHT]}
+1U[ SRIGHT]
@[UP]{
- .ESGETCOLUMN
- (.ESLINEFROMPOSITION-1)
- ESFINDCOLUMN-.M#c
+ 4EJ(ESLINEFROMPOSITION-1)ESFINDCOLUMN:-.M#c
}
-@[UP]{(M[UP]}
-1U[UP]
+@[ UP]{(M[UP]}
+1U[ UP]
@[DOWN]{
- .ESGETCOLUMN
- (.ESLINEFROMPOSITION+1)
- ESFINDCOLUMN-.M#c
+ 4EJ(ESLINEFROMPOSITION+1)ESFINDCOLUMN:-.M#c
}
-@[DOWN]{(M[DOWN]}
-1U[DOWN]
-
-@[CLOSE]{(EX)}
-1U[CLOSE]
-
-! enable function key (macro) support !
-0,64ED
+@[ DOWN]{(M[DOWN]}
+1U[ DOWN]
+
+@[ CLOSE]{(EX)}
+1U[ CLOSE]
+
+!*
+ * Zoom with F9/F10 if function keys are enabled.
+ * This is automatically rubbed out.
+ *!
+@[ F9]{(ESZOOMOUT{-13D}}
+1U[ F9]
+@[ F10]{(ESZOOMIN{-12D}}
+1U[ F10]