Slashdot Mirror


The Birth of vi

lanc writes "Bill Joy, co-founder of Sun, tells the story of how he wrote the vi editor. The article at The Register delves into his motives, who instigated the project, and some of the quirks of leaving a 'gift to mankind'. From the piece: '9600 baud is faster than you can read. 1200 baud is way slower. So the editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore. The people doing Emacs were sitting in labs at MIT with what were essentially fibre-channel links to the host, in contemporary terms. They were working on a PDP-10, which was a huge machine by comparison, with infinitely fast screens. So they could have funny commands with the screen shimmering and all that, and meanwhile, I'm sitting at home in sort of World War II surplus housing at Berkeley with a modem and a terminal that can just barely get the cursor off the bottom line.'"

8 of 459 comments (clear)

  1. Re:I've been using vi for so long... by Scarblac · · Score: 4, Insightful

    Ironically, it doesn't really matter all that much if a command is mnemonic or makes sense in some other way, precisely because, as you say, "they are so ingrained in my brain I don't even remember the actual key sequences."

    And from the point of an Emacs user, it doesn't seem so different to need to hit C-X before some commands, than to hit ESC and :.

    That said, they're both fantastic text editors. Programmers do their daily work with text, and these two text editors really reward the time you put into learning them. Who cares about a learning curve if this is the sort of tool your career is built around; you need power.

    --
    I believe posters are recognized by their sig. So I made one.
  2. Those who forget history... by neongenesis · · Score: 5, Insightful

    This is good history to remember. Those who weren't there find it hard to appreciate the tremendous leap forward of Unix Version 6 and ed on a PDP-11. We had been using teco on our PDP-10 and the cousin of ed that was on Multics, but we had been getting into PDP-11s for more and more things. Comparing ed on Unix with the line editors available on PDP-11 DOS/BATCH and that new-fangeled RT-11 thing was amazing. Along with all the other tools available on Unix, the PDP-11 went from a toy to a state-of-the-art (for then) development environment. We were mostly on DECwriters and TI-Silent 700s runing hardwired 1200 baud at work and 300 baud from home over the modems. We started to get VT-100s about the time vi was being released and it was again a great leap forward.

    Thanks Bill Joy! I have used your work in the BSDs and Suns and all the followons over the years, but vi was a most important gift at an important time.

  3. Re:Recommended for new *nix users? by larien · · Score: 4, Insightful
    vi is worth knowing at least the basics of, simply because it's installed by default on 99% of Unix & linux systems. The only other editor you can pretty much guarantee to be installed is ed, which is even less user-friendly than vi.

    While emacs, pico etc are installed on most linux systems, you won't find them on Solaris, AIX or HP-UX.

    For an end user, they probably shouldn't worry too much as they'll have kedit or something in the GUI, but *nix admins should know vi.

  4. Re:So let the flame wars begin! by donaldm · · Score: 5, Insightful

    Oh dear back to the eighties.

    I think the easiest way to sum up Emacs vs Vi is "vi" is for System Admins and people who want to get the job done quickly and efficiently without having to learn Control and Esc commands (if you look "vi" commands they are surprisingly logical compared to "Emacs"), while Emacs is for people who either have dedicated terminals or have a masochistic streak. This is not to say "vi" is better than "Emacs" in fact it is the other way round and if you are prepared to learn it then it is extremely powerful and can make you much more productive. Of course I am generalising but I do remember the first "vi" vs "Emacs" wars.

    If you want a graphical editor there is "gvim" or "xEmacs" both great if you have a GUI, however if you are moving between different Unix machines you have to remember that "xEmacs" or even "Emacs" as well as other so called "free" editors may not be installed so that is why most Systems Admins learn "vi" rather than learn "Emacs". Of course if you are a Systems Admin you should at least be aware of how to use "ed" as well.

    To sum up. If you like and can use an editor (not just "vi" or "Emacs") productively then go for it.

    Now bring on the "car" analogies. Please no "edlin" since you should be marked as "funny" or "troll"!

    --
    There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
  5. Hard to learn but worth it by jlherren · · Score: 5, Insightful

    vi was a horror when I started using UNIX systems and I couldn't understand why anyone would want to use such a strange editor. So I went with emacs and was happy. But after a while (dunno how this happened) I went back to vi(m) and invested the necessary time to learn it. I took me about a year before I could say that I'm able to use it efficiently, so the learning curve is pretty heavy. But at the end I don't regret it at all, because I feel a lot more efficient with vi(m) than with any other editor. I couldn't live without it now.

    Good tools are hard to master.

  6. Re:Too late by Alioth · · Score: 4, Insightful

    I use vi (actually, vim) all the time. Many people do. It is a *good* well featured editor which doesn't take up too much space. It runs on all the operating systems I use every day - OpenBSD, Linux, Macintosh and Windows. If I have a GUI, I use the GUI version. If I don't, I use the terminal version. It is consistent across all those four operating systems I mention regardless of whether I'm using it via the GUI or over an ssh terminal session. That consistency is worth _a lot_. It doesn't need the mouse either which makes it much faster to use. Vi is just as relevant today as it was back when it was written, possibly more so because of its consistency across systems.

  7. Re:So let the flame wars begin! by bunratty · · Score: 4, Insightful

    As someone else has pointed out, sometimes you simply don't have a GUI editor available. What are you supposed to do when you telnet into a machine and need to edit a file? I learned vi long ago when I was in such a situation, and it's still my preferred way to program. I think it's just faster to keep my fingers over the letters than to have to move them to the mouse, or even over to the arrow and ctrl keys. The esc key is about as far as they need to go, and only when I want to change from insert mode to command mode.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  8. Re:So let the flame wars begin! by Chris+Mattern · · Score: 4, Insightful

    > I'm obviously lacking in history when it comes to the Linux/Unix world, but
    > why the hell do so few apps make use of the Function keys ? It's always Ctrl-
    > something.. I'm fine with Ctrl-X and whatnot because they're where my hands
    > would sit, but how hard would it be to just alias F1 to Help, F2 to Save, F3
    > to Open, in addition to the classic shortcuts..

    Pretty damn hard, actually. DOS editors had the advantage of knowing they'd always
    be sitting on an IBM-standard PC, with the same scan codes for the functions keys.
    But function keys aren't standard. Control-letter codes are. UNIX utilities therefore
    have real difficulty with function keys. You have to use termcap/terminfo, and
    make sure that it's correctly configured. Control-something will always just work.

    Sometimes it is set up for you, and it's always been possible to set it up for
    yourself. But most UNIX programmers have never cared that much because most
    UNIX programmers are touch typists...and touch typists hate function keys (and
    arrow keys, and mice) because they take your fingers off the home keys. Much
    better to use ctrl- or alt- codes that don't interrupt your typing.

    Chris Mattern