aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/sciteco.7.template
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-19 23:59:52 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-20 01:52:39 +0100
commit84ab1698e63170a94cfa1c5d99b7316cf3c2b584 (patch)
treecb87e28be35e710b960d6e643f4ea7cf5596ec96 /doc/sciteco.7.template
parentf9e6f8630cdb0c6d056154b82e8f94289509f48a (diff)
auto-completion of Q-Register names, goto labels and help topics
* Using a common implementation in RBTreeString::auto_complete(). This is very efficient even for very huge tables since only an O(log(n)) lookup is required and then all entries with a matching prefix are iterated. Worst-case complexity is still O(n), since all entries may be legitimate completions. If necessary, the number of matching entries could be restricted, though. * Auto completes short and long Q-Reg names. Short names are "case-insensitive" (since they are upper-cased). Long specs are terminated with a closing bracket. * Long spec completions may have problems with names containing funny characters since they may be misinterpreted as string building characters or contain braces. All the auto-completions suffered from this problem already (see TODO). * This greatly simplifies investigating the Q-Register name spaces interactively and e.g. calling macros with long names, inserting environment registers etc. * Goto labels are terminated with commas since they may be part of a computed goto. * Help topics are matched case insensitive (just like the topic lookup itself) and are terminated with the escape character. This greatly simplifies navigating womanpages and looking up topics with long names.
Diffstat (limited to 'doc/sciteco.7.template')
-rw-r--r--doc/sciteco.7.template42
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index 9ce5bf8..c7dfc3e 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -350,6 +350,10 @@ TECO implementations.
Most of these commands are control codes, so their control code
mnemonics are given as well.
.
+.\" FIXME: The auto-completion immediate editing commands
+.\" should probably be broken out of this table to keep it
+.\" small and moved into their own table in the AUTO COMPLETIONS
+.\" section.
.SCITECO_TT 90n
.TS
expand,allbox,tab(;);
@@ -488,6 +492,24 @@ rubbed-out part of the command line, stopping at the string's
terminating character.
T}
T{
+Auto complete Q-Register name
+T};9;^I, Tab;T{
+Q-Register specifications
+T};T{
+In all Q-Register specifications \(em either after a command
+with a Q-Register argument like \fBM\fP or as part of a string building
+construct like \fB^EQ\fP (of course including string building
+constructs \fIwithin\fP Q-Register specifications) \(em
+auto complete the local or global register name beginning at
+the start of the specification.
+In the case of one or two-letter specifications (\fB#\fIxy\fR),
+only one or two-letter register names are considered for
+auto-completion.
+In the case of long specifications (\fB[\fIname\fB]\fR),
+fully completed names are terminated with a closing bracket,
+thus ending the specification.
+T}
+T{
Auto complete filename
T};9;^I, Tab;T{
String arguments
@@ -528,6 +550,26 @@ commands), complete beginning with the symbol, terminating fully
completed symbols with a comma.
T}
T{
+Auto complete Goto label
+T};9;^I, Tab;T{
+Goto command arguments
+T};T{
+In Goto label arguments (\fBO\fP command),
+complete beginning with the current label, terminating fully
+completed labels with a comma.
+T}
+T{
+Auto complete help topic
+T};9;^I, Tab;T{
+Help topic arguments
+T};T{
+In help topic arguments (\fB?\fP command),
+complete beginning at the start of the command.
+Fully completed topics terminate the string argument,
+effectively opening the corresponding \fIwomanpage\fP,
+except if the \(lq{\(rq terminator is used.
+T}
+T{
Indent to next tab stop
T};9;^I, Tab;T{
Text insertion arguments