From 48308687979f26a3498e7af94eacc8fe34307a78 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 4 Dec 2024 16:43:51 +0300 Subject: the command now supports the @ modifier for cutting into the register * Can be freely combined with the colon-modifier as well. :@Xq cut-appends to register q. * This simply deletes the given buffer range after the copy or append operation as if followed by another command. * This has indeed been a very annoying missing feature, as you often have to retype the range for a K or D command. At the same time, this cannot be reasonably solved with a macro since macros do not accept Q-Register arguments -- so we would have to restrict ourselves to one or a few selected registers. I was also considering to solve this with a special stack operation that duplicates the top values, so that Xq leaves arguments for K, but this couldn't work for cutting lines and would also be longer to type. * It's the first non-string command that accepts @. Others may follow in the future. We're approaching ITS TECO madness levels. --- doc/sciteco.7.template | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index e5d9683..1777d54 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1330,7 +1330,9 @@ are handled interactively. . A command's behaviour or syntax may be influenced by so called modifiers written in front of commands. -When specifying more than one modifier their order is insignificant. +Their specific influence of a modifier always depends on the concrete +command following it. +When specifying more than one modifier, their order is insignificant. .LP .SCITECO_TOPIC : colon The colon (\fB:\fP) modifier usually prevents a command from @@ -1345,8 +1347,9 @@ For instance if \(lq1000C\(rq would fail, \(lq1000:C\(rq will return 0 instead. .LP .SCITECO_TOPIC @ at -The at (\fB@\fP) modifier allows the string termination character -to be changed for individual commands. +When put in front of a command with string arguments, +the at (\fB@\fP) modifier always allows the string termination character +to be changed for that particular command. The alternative termination character must be specified just before the first string argument. For instance: @@ -1375,6 +1378,13 @@ The termination character can be \fIquoted\fP if you want to handle it like any regular character. For instance, you could write \(lqS^Q\fB$$\fP\(rq to search for the escape character itself. +.LP +The at (\fB@\fP) modifier may also sometimes be supported by commands, +that do not accept string arguments. +For instance, \fB@X\fIq\fR cuts text into Q-Register \fIq\fP. +\# But there is no common semantics for @ on regular commands, yet. +\# We may some day add @Mq/.../ for passing string arguments to macro calls, +\# but it will be yet another special case. . .SH Q-REGISTERS .SCITECO_TOPIC Q-Register -- cgit v1.2.3