2 ms·
> Has anyone come up with an ed with the advantages of a modern screen, so it shows the full file on the side but you can still run ed commands on it? Unless I
by jolmg 6y ago
> Has anyone come up with an ed with the advantages of a modern screen, so it shows the full file on the side but you can still run ed commands on it?
Unless I misunderstood you, it's called Vi(m).
> I am curious if anyone uses ed as their editor of choice these days, assuming an actual screen and such of course. If so, why? Muscle memory?
If I'm on a machine where the choices of editor are either ed or nano, I prefer ed.
Also, if I want to do some text processing on a bunch of files and it's simpler to do it with an ed script than with sed or awk, I'll use ed. It has happened.
If I remember right, I wanted to edit some upper lines when some lower lines matched some regex for a bunch of files. It ended up being an ed command like 'g/foo/?bar?s/baz/qux/'. Doing something like that with sed or awk gets more complicated.
> Edit: ... I was thinking of something a little less different, like literally just a command prompt on the bottom and a pane above centered on the line you just operated on.
If you stick to command-mode, that's pretty much what vi and vim are. You could run this in vim:
:cmap <enter> <enter>:
to re-enter command-mode automatically as soon as you leave it.