|
|
|
|
|
by jlp__inf
85 days ago
|
|
Thanks for sharing this, I’m learning a lot from it. So if I understand correctly, it’s selection-based, right?
You first select a region, and then you can apply further selections inside it? So you kind of build nested selections to match exactly what you want (almost like a conditional tree). And then you apply operations on the current selection For example substitution with something like c/PATTERN/, is that correct? |
|
. The dot (".") never matches newlines, which keeps line-oriented idioms from accidentally spanning newlines [1]
. Changes must be sequential and non-overlapping (that's why I deleted the whole thing before processing in the third example).
. Sam matches only the original input, not past changes.
. Addresses (expressions before commands) select a single range, x commands select multiple ranges and loop over it.
[1]: https://p9f.org/sys/doc/sam/sam.html, Regular expressions