ed: The much maligned text editor

I was a little disappointed this morning when I realized that ed, the curmudgeonly editor that technically dates back 40 years or so in *nix history, wasn’t installed by default on my Arch Linux machine.

I wasn’t surprised though; I can remember a forum debate a few years ago about whether or not it was really critical to the core packages that drew it in. It must not have passed muster, I guess. Hence my wry disappointment. 😐

It’s no major loss. ed is probably the least friendly, least communicative editor you’ll ever encounter … or that I have encountered, anyway.

2013-10-18-lv-r1fz6-ed

The trick to using ed is to remember three things:

  1. ed works line by line. Remember that, and things make more sense.
  2. ed doesn’t want to give out too much information. Which makes it very Unixy.
  3. ed hates your guts.

Okay, that last one is a lie. ed doesn’t hate your guts.

And really, given the churlish foofaraw that surrounds it, ed actually works pretty well. It has an insert (and append) mode and a command mode, a lot like vim.

And it can do search and replace sequences, like emacs. And load and save by file name, like Notepad. And filter text, sort of like grep. And explain its cryptic “?” error messages. And a lot of other things too.

I don’t count myself as an ed expert. But I think it’s fair to say that most of the basic functions you would look for in any text editor are present in ed. They might be a little more cryptic, but no less functional.

If you want — or need — to get to know ed, I’d start on the linuxquestions.org wiki, which does a good job setting up your basics, and the man page for ed, which handles some more complicated functions.

Get through that, and you’ll realize ed really doesn’t hate anybody. It just takes a little getting to know it. πŸ˜‰

10 thoughts on “ed: The much maligned text editor

  1. Mike

    Guess ed was abandoned from most distributions because with vi(m) installed, there is ex, which is compatible with ed. In fact, ex was heavily influenced by ed as long ago as the 70s, and eventually became vi. I had to deal with ed for years in the late 80s. Helped a lot with learning vi πŸ™‚

    1. K.Mandla Post author

      I found it interesting that Wikipedia cites Ken Thompson as the original author of ed and the progenitor of the Unix philosophy. … I can see how they relate. … :mrgreen:

  2. Pingback: edbrowse: Be afraid. Be very afraid | Inconsolation

  3. Pingback: 5 Text Editors: Valuable for Web Developers | shameem

  4. Pingback: fdisk: | Inconsolation

  5. Pingback: gtypist: Yes, I know I’m a failure | Inconsolation

  6. Pingback: vi and ex: As required by law or custom | Inconsolation

  7. Pingback: ired: Unenthusiastic, as might be expected | Inconsolation

  8. Pingback: ired: Unenthusiastic, as might be expected | Linux Admins

Comments are closed.