From b36ff2502ae3b0e18fa862a01fba9cc2c9067e31 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 4 Oct 2024 23:41:16 +0400 Subject: pattern match characters support ^Q/^R now as well * makes it possible, albeit cumbersome, to escape pattern match characters * For instance, to search for ^Q, you now have to type S^Q^Q^Q^Q$. To search for ^E you have to type S^Q^Q^Q^E$. But the last character cannot be typed with carets currently (FIXME?). For pattern-only characters, two ^Q should be sufficient as in S^Q^Q^X$. * Perhaps it would be more elegant to abolish the difference between string building and pattern matching characters to avoid double quoting. But then all string building constructs like ^EQq should operate at the pattern level as well (ie. match the contents of register q verbatim instead of being interpreted as a pattern). TECOC and TECO-64 don't do that either. If we leave everything as it is, at least a new string building construct should be added for auto-quoting patterns (analoguous to ^EN and ^E@). --- doc/sciteco.7.template | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index ca93fa6..81deac0 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1789,6 +1789,14 @@ The following pattern match constructs are supported for matching one character in different character classes (caret-notations refer to the corresponding control characters): .TP +.BI ^Q c +.TQ +.BI ^R c +Escape character \fIc\fP. +Since these are interpreted as string building characters as well, +you may have to type two or three \fB^Q\fP in a row to escape a +pattern match character. +.TP .SCITECO_TOPIC ^S ^EB .B ^S .TQ -- cgit v1.2.3