[Coco] TEd text editor

johnmarkmelanie at gmail.com johnmarkmelanie at gmail.com
Wed Jan 10 14:27:28 EST 2024


I am thinking it is a line editor.

A line editor is small and can work in 4kB of RAM. You already know how to
use a line editor because BASIC uses a line editor. The BASIC programming
language started out being used on teletype machines and a line editor is
the only way to go when using a paper terminal with no way to erase unwanted
text. The "ed" text editor is included automatically on almost all versions
of Linux. It is very easy to learn to use.

Linux has a diff program that will find the differences of two files. And
you can output the differences in an "ed" format. So, if you have the
original file and the ed-diff file then you can recreate the new file. An
ed-diff file can be used when doing an incremental backup/file-sync.

You can also write a script file to edit a document. This is because there
is no concept of a cursor when using a line editor. You can open a document
and change every occurrence of "Red Hat" to "IBM/Red Hat" and save the
results.

If you can learn about 7 commands, then you can use ed. Commands like
insert, append, join, search-and-replace, print, delete, write, and quit. I
think a command like "1,5p" will print the first 5 lines of the file. And a
command like "1,$p" will print the whole file.

Even if I am wrong about this, I think it would be a good idea to port "ed"
to the CoCo. Perhaps OS-9/6809.

This is what I found when I went searching...

ed text editor - Google Search
https://www.google.com/search?q=ed+text+editor

ted (the Tiny EDitor) download | SourceForge.net
https://sourceforge.net/projects/ted-editor/

ed (text editor) - Wikipedia
https://en.wikipedia.org/wiki/Ed_(text_editor)

Ed, man! !man ed- GNU Project - Free Software Foundation (FSF)
https://www.gnu.org/fun/jokes/ed-msg.en.html

ed(1): text editor - Linux man page
https://linux.die.net/man/1/ed

-John Mark Mobley




More information about the Coco mailing list