There's no reason to use ed. It's a historical novelty at this point. Move on.
"oh no i reinstalled the os on my vps and now ssh has it on good authority (said authority is line 68) that someone is doing something nasty" ed .ssh/config 68d wq done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back again also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions: postPatch = '' ed Makefile etc etc s…
Ed is the standard text editor (2014)
21–30 of 125 posts
Re: Ed is the standard text editor (2014)
#22Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!! TEXT EDITOR.
Exactly. I assumed this would be a link to the glorious document https://www.gnu.org/fun/jokes/ed-msg.html I love reading C2, but anything in reference to ed(1) besides "Ed, man! !man ed" is wasting my VALUABLE time. :-)
Re: Ed is the standard text editor (2014)
#23 ed $file Re: Ed is the standard text editor (2014)
#24People make fun of ed, but the command line is basically ed with the ability to execute.
Still sucks though. Even in psql I regularly drop into vim with \e to edit whole queries before sending them out.
Re: Ed is the standard text editor (2014)
#25The way it worked was like this: As you keyed in your program, letter by letter, it was printed out on the paper immediately like a typewriter. If you ran the program and there was a problem, you'd just read (or re-read) the printout, find the line with the bug, then use a line editor to fix just that line. You might mark the paper with pencil to keep track of the change. After a while if you needed to see the latest version, you'd just print the whole program out, or just the lines you needed.
This realization finally clued me into what was going on when I was 10yo and programming BASIC on a TRS-80 Color Computer. It was essentially simulating a teletype (which makes sense given BASIC's inception at Dartmouth [2]), where you would type each line individually, then if there was a problem, you would edit the program individual lines at a time. I always thought it was an odd until I understood how actually using a teletype actually worked. Also explains why the command to write letters to the screen is called "PRINT".
1. https://www.gatesnotes.com/About-Bill-Gates/Early-Days-as-a-...
Re: Ed is the standard text editor (2014)
#26There's no reason to use ed. It's a historical novelty at this point. Move on.
Re: Ed is the standard text editor (2014)
#27I'm reminded most of all of the fdisk util, where the workflow is pretty much the same: print, modify, print, save. But also I can see where Vi/Vim come from, as I regularly do the same thing as in the vid: %s/something/something else/g and then wq.
Re: Ed is the standard text editor (2014)
#28I still lament that the C2 wiki switched to JS rendering.
Re: Ed is the standard text editor (2014)
#29Perhaps it's better to see for a minute how people used this kind of editors when they first appeared, than to keep reading about them for ages: https://youtu.be/b6URa-PTqfA?t=100 (BBC from '79, mentioning how people start working from home with the aid of newfangled microcomputers and network connectivity). I'm reminded most of all of the fdisk util, where the workflow is pretty much the same: print, modify, print,…
Re: Ed is the standard text editor (2014)
#30There's no reason to use ed. It's a historical novelty at this point. Move on.
"oh no i reinstalled the os on my vps and now ssh has it on good authority (said authority is line 68) that someone is doing something nasty" ed .ssh/config 68d wq done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back again also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions: postPatch = '' ed Makefile etc etc s…
I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.