ed is great when you want to make a quick edit while reviewing what's above the current line in the terminal. Spot a problem, edit a file, and write a commit message while looking at the original problem, the solution, and the steps you took to get there.
ed is also nice if you otherwise want to remain in the cognitive context of the stuff that's already on your terminal. Sometimes that blink that occurs when blanking and replacing your primary visual field can be useful, sometimes not.
ed is a line editor. You know how lots of people like vi because it is so much easier to place the cursor where you want it? ed doesn't even have a cursor. This can be faster in some (rare) cases, but moreover it forces me to think about the file as a structure of code while visual editors generally allow me to be lazy and think about the file as an array of characters.
Finally, ed is great when you know what you want to read and/or write. It is like grep but with the ability to base the next command off the previous one, or to go result by result. It is like editing in place with sed but with far less hassle/risk for one-off changes. If you'd be doing the same thing in vi, you save the trouble of typing ':'.
Along those lines, ed becomes nicer for one-off edits when you compile it with PCRE support rather than the antique, POSIX-standard regular expression format.
For reviewing files on the side, open up another terminal window, read a named pipe, and write to that pipe from ed. Do this with three or four different terminals and you've got a fairly complex set of indirect buffers that can be updated with a bare minimum of tooling.
I wouldn't want to use only ed but I'd miss it if it went away.
ed is also nice if you otherwise want to remain in the cognitive context of the stuff that's already on your terminal. Sometimes that blink that occurs when blanking and replacing your primary visual field can be useful, sometimes not.
ed is a line editor. You know how lots of people like vi because it is so much easier to place the cursor where you want it? ed doesn't even have a cursor. This can be faster in some (rare) cases, but moreover it forces me to think about the file as a structure of code while visual editors generally allow me to be lazy and think about the file as an array of characters.
Finally, ed is great when you know what you want to read and/or write. It is like grep but with the ability to base the next command off the previous one, or to go result by result. It is like editing in place with sed but with far less hassle/risk for one-off changes. If you'd be doing the same thing in vi, you save the trouble of typing ':'.
Along those lines, ed becomes nicer for one-off edits when you compile it with PCRE support rather than the antique, POSIX-standard regular expression format.
For reviewing files on the side, open up another terminal window, read a named pipe, and write to that pipe from ed. Do this with three or four different terminals and you've got a fairly complex set of indirect buffers that can be updated with a bare minimum of tooling.
I wouldn't want to use only ed but I'd miss it if it went away.