On 2026-04-02 01:45, Artyom Bologov writes:
what if G line printing was configurable?

A more modern implementation of ed might work for you:

https://github.com/slewsys/ed

Let's say you want to view lines matching `/<div/' in the context of
the two preceding and following lines.  Use:

/<div/[6

The `[' command prints the matching line in the middle of the page,
and the `6' suffix sets the page size to six lines (including the
command line).  To view the next match in context, use:

//[

The window size now defaults to `6'.  Of course, you can include a
print suffix. So, e.g.:

//[n

works as expected.

Hope that helps!


Reply via email to