On 16/11/2019 06:55, Roderick wrote:
On Thu, 22 Jan 1970, Chris Bennett wrote:
Yes, but ed also allows one to easily work with only 1-3 lines of
screen.
I think with every line editor is so?
I don't know of any line editors aside from ed, Vi's open mode, Sam,
Edlin, and QED and its deriviatives.
This has gotten me thinking about whether line-based editing is really
the best abstraction for simple editors.
If I understand right then this is what structural regular expressions
are supposed to expand on.
The power of ed is in the regular expressions, search and substitution.
I assumed that the canonical reference for ed was K&P, "The Unix
Programming Environment". But since then I have discovered this book:
https://mwl.io/nonfiction/tools#ed
When I return home I will buy it. (I'm overseas at the moment.)
What are some other good books for learning ed? How about online
resources, e.g., FTP sites with collections of interesting scripts.
I'm particularly interested in its history, usage idioms, different
implementations, multilingual capabilities, and using it as a vehicle
for mastering regular expressions to the point that they are second nature.
Sam looks very interesting too, and twenty years after writing my first
text editor I've returned to my favorite type of personal side project,
and looking for the kindest mix of functionality and simplicity. The
key was understanding not to make something "no simpler" than the
simplest useful design.
The only thing that I find more comfortable in sos and miss in ed
is the line alter mode that allows to interactively delete and
insert characters in a line.
What is sos? Is it something like open mode in Vi?
That is also what one wants to carefully
do in configuration files. Normaly no big editing.
Indeed. Sometimes my blood runs cold when I'm writing and deploying a
hotfix of this nature in a production system. The example that somebody
gave earlier in this(?) thread about fixing a `/etc/fstab` is one that I
have experience with.
Andrew
--
OpenPGP key: EB28 0338 28B7 19DA DAB0 B193 D21D 996E 883B E5B9