In the beginning there was the bit, Turing, logic, the difference engine, ada lovelace, and a whole bunch of other important names and ideas...

Later on UNIX and C came on the scene. Life was good. Tech was still high and far out of the reach of the crass comercialism that grabs at it some 30 or so odd years later.

There was ed... I wasn't born. Eh, I wasn't born for any of this first wave stuff.

Then vi emerged. Full screen they said... what a waste. But my goodness, I can see a good chunk of my program all at once. I am understanding things differently...

Then emacs came along. It's strange and bizarre modifier key chords were an entirely different editing paradigm than the mode based editing of vi. But with its embedded interpreted emacs lisp language, emacs stood alone as a highly extensible piece of software.

Free software development put a darwinian twist onto the emacs vi affair, and left us with two prime specimens:

These lean machines have everything (multiple windows, tab completion, syntax highlighting) it would seem, but yet the different starting points have made them utterly different.

For example the concept of yanking something means to yank it from the kill ring in emacs, while it means to copy it from the open file in vim.

Such differences are myriad in nature and in danger.

If you ever his C-x C-s in vi to save something just hit your scroll lock or hit C-q to get your cursor back.

That is all I can say for now, but be warned someday the emacs vi unification will be more than just viper mode.

Emacs has viper-mode; vi has no Emacs emulation available (although I'd love to get back a set of macros for vi I once had that simulated a Turing machine, proving that vi too can do anything). Ergo Emacs is superior.

Emacs has viper-mode; vi has no Emacs emulation available...Ergo Emacs is superior.

I've heard this argument before, and I don't buy it. It can be restated as: the set of functionalities of X is contained in Y as a proper subset, therefore Y performs the functionalities of the subset in a superior manner.

Well, I have a big heavy computer that can emulate a doorstop. But I don't use it as a doorstop, because my little rubber one is more compact and suitable for the job.

(Full disclosure: I am a rabid Emacs user, and I think it's superior too, just not for the reasons above).

In the land of Unix, vi is a native and Emacs is an alien. Whether it's an alien from space or an alien from a foreign country depends on how I'm feeling at the time, but it isn't from around here.

vi stands for 'visual interface'. It's a visual interface to ex, a Unix text editor developed by Bill Joy and others around 1976 as a line editor that grew out of constant hacking on ed, the line editor created by Ken Thompson around 1970 for the original Unix system. vi came soon after ex, and was also in use in 1976.

Emacs ('Editor MACros') was originally written around 1975 by Richard Stallman and many others in the command language of a text editor for ITS called TECO (Text Editor and COrrector, originally Tape Editor and COrrector because it was first designed to edit files stored on paper tape). ITS stood for 'Incompatible Timesharing System', and it was even stranger than that. The command line in ITS was a machine code debugger like MS-DOS's could only dream of being. The most important thing about ITS, however, was that it was a child of wealth: MIT officially sanctioned it, as bizarre as it was, and gave the people using it high-end computers that could run an interactive full-screen text editor written in a high-level language without bogging down completely.

ed, on the other hand, was a child of poverty. The original Unix was a very much unsanctioned (or semi-sanctioned) use of an obsolete PDP-7 that Bell Telephone Labs (now Lucent) happened to have kicking around in a closet. Even after Unix was ported to more modern hardware it still had to deal with people using it from teletypes, which are typewriters that somehow learned to talk on the phone through a modem. There is absolutely no way to use a full-screen editor on a teletype, so ed was designed to let people edit files line by line. By the time vi was developed teletypes were dead, but Unix systems were still relatively underpowered. Writing an editor in a high-level language simply wouldn't have worked.

In 1978, Bernard Greenberg wrote an Emacs clone for an OS called Multics. It's so important because it was written in Lisp, a programming language that escaped from a mathematician's equations. Lisp was the ultimate high-level language back then, as it had been since 1958 and as it still is (along with others). Writing Emacs in Lisp meant that people could modify Emacs in Lisp, and write extensions to Emacs in Lisp. Lisp, in turn, could be modified in ways to make writing Emacs easier, as all Lisp programs are at least partially an exercise in language-building. Modern Emacs had been born. By the 1980s, both ITS and Multics were effectively dead. The people who worked on them went elsewhere, mostly to Unix, and in 1984 Richard Stallman created GNU Emacs partly to further his political goals but mainly to ensure Emacs, his only begotten son, would survive the destruction of his homeworld.

Lisp programs usually like to stay within the Lisp universe, creating an ethnic neighborhood that hangs together extremely well but doesn't quite mix with the outside city. Some, like GNU Emacs, grow so self-contained they resemble operating systems. People create within Emacs an environment where they can share information freely between programs (called 'modes' in GNU Emacs) and rely on a number of memorized keystrokes and tactics to efficiently rule the universe. That is the glory of Emacs.

vi is only one part of an entire operating system, usually one called 'Unix' or 'Linux' or something similar. It mixes well with the Unix natives like sed and ls and grep. It shares information freely using pipes and temporary files the way all other Unix programs do. People who understand and enjoy the command line use vi as one part of the larger command line universe. That is the glory of vi. -- Interview with Bill Joy about the history of vi. It contains this interesting quote from Joy:

But fundamentally, vi is still ed inside. You can't really fool it. Its like one of those pinatas - things that have candy inside but has layer after layer of paper mache on top.

This is how a lot of Unix programs are created: There is a core engine (usually written in C) that does all the hard work with algorithms and brutal speed hacks. Layered on top of that is the interface, something to make it pretty and usable. In Emacs, on the other hand, the only thing written in C is a Lisp compiler/bytecode interpreter. All of the 'editor' stuff is in Emacs Lisp. -- A very brief history of early Unix. -- A story on the original wiki revealing the true origin of Emacs.

Log in or register to write something here or to contact authors.