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.'"

22 of 459 comments (clear)

  1. So let the flame wars begin! by messju · · Score: 5, Funny

    (I'm using Emacs, BTW.)

    1. Re:So let the flame wars begin! by 91degrees · · Score: 5, Funny

      I hate them both.

      I'm not popular amongst Unix users.

    2. 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.
    3. Re:So let the flame wars begin! by wakejagr · · Score: 5, Funny

      screw you guys, I cat everything through sed, and I like it that way!

      --
      Don't save Windows XP! http://www.petitiononline.com/jjw1xp/petition.html
    4. Re:So let the flame wars begin! by Janek+Kozicki · · Score: 5, Funny

      I have a nano sense of humor, so I don't get it.

      --
      #
      #\ @ ? Colonize Mars
      #
    5. Re:So let the flame wars begin! by billcopc · · Score: 5, Interesting

      Ok here goes nothing. I'm a DOS veteran, and I treated my DOS like most people treat their Linux, using extensive modifications and addons to improve usability and productivity. Way back there was Edlin, which even in 1984 felt really ghetto. Its saving grace was that it could be easily scripted for batch usage. Some people used Wordstar, but I personally couldn't stand it. Sure enough, I trivially coded my own full-screen editor in BASIC, and all was well. Then came MS-DOS 5.0, with its flashy Dos Shell and Edit.com, which was really just QBasic minus the Basic part. It worked, it had a cutesy little drop-down menu like Windows apps did, and its usage was obvious to even the most ignorant of users.

      So then one day I get my hands on Slack 2.0. BLECH! Where's the simple full-screen editor I've grown so fond of over the past decade ? :P vi didn't make any sense to me, and Emacs seemed like a huge mess of plugins that ate up more disk space than the OS itself. Now 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.. It would certainly make it much easier to teach.

      And then there's the matter of arrow keys... sometimes they work, sometimes they don't. Ctrk-V or Y for pageup-pagedown, and something else for top/bottom. Now I agree that Unix came first and those shortcuts were probably in use way before Dos ever came along, but why hasn't anyone taken the liberty of adding the "idiot" shortcuts so that Joe Random Switcher can actually try Linux without spending 3 days in complete darkness trying to get a friggin cursor to move ? It's not like those movement keys have anything better to do, most of the time they just spew meta-characters like ^Q^1 or whatever.

      If a text editor does anything more complicated than receive text input and save it to disk, it's no longer an editor in my book. Type setting ? it's a word processor. Syntax highlighting ? it's a development environment. Kinky macro processing and pseudo-hypertext Info-page fornication ? it's a dirty old man's poor excuse for an OS. I'm talking about you, Mr Stallman.

      --
      -Billco, Fnarg.com
    6. Re:So let the flame wars begin! by Ithika · · Score: 5, Funny

      I don't gedit.

    7. Re:So let the flame wars begin! by timeOday · · Score: 5, Funny
      CLI will always have it's place... much like my half-retarded nephew who lives under the stairs... however as I for one can't wait for the day that intuitive interfaces rule the computing landscape with a soft, friendly fist!!!
      Why are you using a text editor at all? Shouldn't you be doing all your programming via drag and drop? And why does your post use text instead of more user-friendly pictograms? Maybe you can find yourself a nice keboard-free computer.
  2. I've been using vi for so long... by tuxlove · · Score: 5, Funny

    I think in vi. When editing, commands just happen like thoughts. They are so ingrained in my brain I don't even remember the actual key sequences. When a vi newbie asks, "how do you do XYZ in vi?," I have to stop and think hard, because I don't even know the commands any more.

    Vi is the ultimate editor, for one main reason. It's a modal editor, so commands can be mnemonic. With editors like emacs, you're always having to hit ^X before commands, or with MS word you're always having to lift your hand off the keyboard to move the silly mouse around. With vi, you don't need a steenking mouse. Your hands never leave the keyboard. And commands make sense and don't require that you hit some yucky control sequence to initiate.

    I love my vi.

    1. Re:I've been using vi for so long... by daddyrief · · Score: 5, Funny

      I second you, I'll even double it -- I love my vvii :P

      --
      "Banking establishments are more dangerous than standing armies." -Thomas Jefferson
    2. Re:I've been using vi for so long... by quintesse · · Score: 5, Funny

      No no, it's the perfect first obstacle to weed out the people who shouldn't be doing any programming/writing on a *NIX system! A bit like entrance exams for universities.

      Of course, the first thing I did when I was confronted with vi back in the 80s was write my own editor.

    3. Re:I've been using vi for so long... by Gnavpot · · Score: 5, Funny
      Yeah, but which editor did you use to write the code for your editor?

      He wrote another editor for that purpose.
    4. Re:I've been using vi for so long... by Anonymous Coward · · Score: 5, Funny

      and since one editor must be written in another editor, something must have written the very first editor - therefore God exists

    5. Re:I've been using vi for so long... by Gnavpot · · Score: 5, Funny
      and since one editor must be written in another editor, something must have written the very first editor - therefore God exists

      Are you claiming that editors are intelligently designed?
  3. Recommended for new *nix users? by BarneyRubble · · Score: 5, Interesting


    > It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore

    I use vi everyday but i've long stopped recommending it to most people i introduce to linux.
    it really doesn't seem worth steep learning curve for most people.

    Do you recommend vi to all new *nix users now?

  4. 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.

  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. Interesting Choice of News by icedivr · · Score: 5, Informative

    The article has definately triggered some nostalgic moments, but it's an article from September 2003 that reports on the content of an interview conducted in 1999. It isn't really news any longer.

  7. Not hard enough.. by B5_geek · · Score: 5, Funny

    I haven't found vi or emacs to be hard enough.

    That why I port edlin to every box I work on.

    --
    "The price good men pay for indifference to public affairs is to be ruled by evil men." ~Plato (427-347 BC)
  8. Obligitary joke by zakezuke · · Score: 5, Funny

    "My PID is Inigo Montoya. You kill -9 my parent process, prepare to vi. "

    modded down in three, two...

    --
    There is no sanctuary. There is no sanctuary. SHUT UP! There is no shut up. There is no shut up.
  9. Join the Church of vi by Chrax · · Score: 5, Funny

    :w saves!

    I actually want that on a t-shirt. I would do it myself, but I don't think my stenciling skills are up to the task.

  10. Re:Too bad vi sucks by TheRaven64 · · Score: 5, Interesting

    Modal editors are a bad idea, but the thing is, most people don't actually want an editor. Most of the time, they want an electronic typewriter. Entering text and editing text are two conceptually separate tasks, and this is why vi works as an exception to the rule 'modal user interfaces are bad.' Vi is really two separate applications; one for entering text, and one for editing text. Because you often want to do these in quick succession, it allows you to quickly switch between them.

    --
    I am TheRaven on Soylent News