fpjohnston / TECO-64

Enhanced and portable version of TECO text editor in C.
24 stars 6 forks source link

Feature request: double colon FS #23

Open LdBeth opened 3 months ago

LdBeth commented 3 months ago

There is an undocumented extension command from TECOC, ::FStext1$text2$, accept no numeric arguments, functioning the same as .,.+1:FCtext1$text2%, that is replace only if the string immediately after the point matches, and return search status. (The source code comment in TECOC is a bit wrong because it forgets that FS took two text arguments)

https://github.com/blakemcbride/TECOC/blob/b4a96395a18c7e64ccaef0e25fdde3b7ef33ac4b/src/exef.c#L226

LdBeth commented 3 months ago

Turns out this command is documented by TECO manual:

Anchored search: A search (S) or search and replace (FS) command that is preceded by a ::.