Ed Is The Standard Text Editor

ed is a powerful text editor based on non-visual (line-oriented) behavior. Think of it as an ultimate form of non-WYSIWYG: instead of seeing some part of the text you're editing on the screen and making modifications into the seen version, you have separate commands for showing text, adding it, moving in it, changing it, and so on. The standard argument about vi, that you have to learn it anyway if you're going to rescue a Unix system sometime, applies double to ed: I remember some rescue disk with only ed, no vi. (Much in line with echo * as an ls replacement). As with vi, after some usage you might become quite fluent with ed.

There are also some environments where the line-oriented paradigm is the only option. These include environments where output of different programs continuously clutters your screen (MultiUserDungeons?, for example), terminals that have no positioning commands, and very slow lines (you don't want ncurses to refresh your screen on a 2400 baud connection every time you add a line, even if curses uses differential display).

In addition to being one of the only line-oriented editors (ex notwithstanding), ed is one of the least friendly editors around. It does nothing without being asked to, its error messages are mostly '?', it does not offer help in any form, and it is not customisable. It is a modal editor, sometimes leaving you more lost than vi. However, I think it is easier to get out of ed than of vi if you got there by accident. (And you do get into vi by accident a lot.)

I think an enhanced ed, with some niceties like automatically showing the context of editing, could easily be my editor of choice. Also, I think the model of changing text should be rethought.

Here are some advice to get you going:

[the following part moved from EmacsVsVi]

  From: patl@athena.mit.edu (Patrick J. LoPresti?)
  Message-ID: <1991Jul11.031731.9260@athena.mit.edu>
  Sender: news@athena.mit.edu (News system)
  Subject: The True Path (long)
  Date: 11 Jul 91 03:17:31 GMT
  Path: ai-lab!mintaka!olivea!samsung!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!patl
  Newsgroups: alt.religion.emacs,alt.slack
  Organization: Massachusetts Institute of Technology
  Lines: 95
  Xref: ai-lab alt.religion.emacs:244 alt.slack:1935

When I log into my Xenix system with my 110 baud teletype, both vi *and* Emacs are just too damn slow. They print useless messages like, 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time.

Ed, man! !man ed

ED(1) UNIX Programmer's Manual ED(1)

NAME ed - text editor

SYNOPSIS ed [ - ] [ -x ] [ name ] DESCRIPTION Ed is the standard text editor. ---

Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!

"Ed is the standard text editor."

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

Of course, on the system *I* administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!

"Ed is the standard text editor."

Let's look at a typical novice's session with the mighty ed:

golem> ed

? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? ^C ? ^C ? ^D ?

--- Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.

"Ed is the standard text editor."

Ed, the greatest WYGIWYG editor of all.


When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!


When IBM, in its ever-present omnipotence, needed to base their "edlin" on a UNIX standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.

Ed is for those who can *remember* what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!


The best thing about ed is it has this really useful visual mode. Just start it up and type :vi ... but don't try that on your 110 baud tty.

That should not work. Maybe you are on an evil system where ed is a link to ex?

Hmm. Actually I'd really like a 110 baud tty - anyone know where I can get one these days?''

Get a VT100 and set it to 110 baud.

I was reminded of the famous "ed is the standard text editor" rant above when I saw on a colleague's desk a box bearing (among others) these words:

Once you've experienced the massive power and time saving advantages of working with the one single editor (no matter what your editing or programming task) you'll wonder how you ever got by without ED! Every programmer, system administrator and PC User could do with some help from ED!

Imagine the benefits of using the one editor for all your programming languages. From Assembler to VHDL, ED is the one-stop productivity tool that slashes coding time. [...] ED powers up YOUR development environment, without tying you to a particular language or platform.

Unfortunately, this ED appears to be a hairy thing with lots of windows, syntax colo[u]ring, and the like...


Mmm, now there's an idea: adding syntax coloring to ed... Perhaps we could also build a Lisp interpreter into it?


BabelFish says: ¡El Ed es el editor de textos estándar!

Ed editor textorum probatissimus est -- Cicero, De officiis IV.7

Do people actually use ed anymore? On most computers, either ed is gone altogether, or it is a symbolic link to vi.

Well, on my box, it is still a glorious stand-alone executable. Not that I use it ever... -- StephanHouben

I occasionally use it, when I am operating over intercontinental distances on a fairly slow link. Just like having a 32-bit colour, 21", 1600x1200 VT100 :)

By the by, `vi' started it's life as a visual mode for ed. If you don't have vim or some such installed, your link of ed to vi is in all probability a link of vi to ed; it will start up automagically in visual mode if envoked by that name.

At least on the free UnixLikes I've seen, ed and vi are separate programs. ed's size on my debian box is around 42k.

I thought ex (not ed) was the non-visual variant of vi. It is common for vi to be a symbolic link to ex or vice-versa.

The GNU system contains a stand-alone ed, so Linux systems which are really GNU/Linux systems (another HolyWar) typically have a stand-alone ed. See http://www.gnu.org/directory/ed.html for GNU ed.

Ed is the standard editor in Plan9. (Apart from acme and sam)...
EditText of this page (last edited October 19, 2004)
FindPage by searching (or browse LikePages or take a VisualTour)