The Birth of vi 459
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.'"
Recommended for new *nix users? (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?
Speed of vi (Score:5, Interesting)
Re:Too bad vi sucks (Score:2, Interesting)
This thinking is precisely why vi continues to be superior to other editors. For some godforsaken reason people seem to be afraid to make modal editors, so "modern" editors damn you to using a mouse or ugly awkward command sequences for everything. Can someone explain why modal editors are a bad thing? It is this very fact that's kept me using vi for decades now.
Unix console text editors are annoying (Score:3, Interesting)
[0] vim.basic: error while loading shared libraries: libgpm.so.1: cannot open shared object file: No such file or directory
Re:Too late (Score:3, Interesting)
I still use vim as my primary text editor, on Linux and Windows. It's just a neat little text editor; it does everything I want it to do and it does it efficiently. Plus I've been using it for years, so I'm comoftable with it. I see no reason to stop using it.
I may have switched to using things like Eclipse for editing specific types of text file (Java, PHP, HTML and XML) and using Visual Studio for coding (because nowdays I'm primarily working on Windows), but vim is still my utility text editor when I want to quickly modify or look at a text file.
I daresay a lot of people feel the same way about emacs; frankly they're entitled to.
Re:I've been using vi for so long... (Score:3, Interesting)
Edlin - 6 month quick fix still available in Vista (Score:1, Interesting)
Yeah Edlin [wikipedia.org]'s not bad for a 6 month quick fix in QDOS [wikipedia.org] which is still available as the *same* version in Vista ! Microsoft certainly know how to resell code
I miss these old editors which had many uses..... With regards to VI for example my friends and myself used to use it to clear out a.out files under rsh (That's RSH as in Restricted SHell under System 4 [uiuc.edu] and NOT Remote SHell)! Mind you that was before we worked out the far simpler command "time csh" which obviously is just a helpful command to time how long you spent in the CSH shell when you ussed that command to start CSH from the RSH shell....
I didn need no stinkeen editors (Score:3, Interesting)
PDP-8s PDP-11s, Interdata 7-32s, Cromemcoes, Keronics (Data General knock offs) all those machines I used to toggle in the IPL boot codes for every morning.
Re:Unix console text editors are annoying (Score:1, Interesting)
just google; you'll find that the original vi is free now, and builds fine on linux.
and there's 'nvi' too, which is also better than vim.
the only reason why someone would use vim is support for multibyte encodings, double-width
characters, etc.
and you could cut & paste a line in vi with ':m+2' eg to move it 2 lines below, or with a
combination of 'dd' and 'p' or 'P'.
finally, vi is a terminal editor, not a kernel, and has no fucking idea of the scancodes
and things like that.
Re:Too bad vi sucks (Score:5, Interesting)
Re:So let the flame wars begin! (Score:2, Interesting)
In most vi implementations, touching the cursor keys has a 50% chance of kicking you out of Insert mode. This appears to be caused by cursor key sequences containing ESC, but seems to happen rather inconsistantly - the same applies to vim when it is in compatability mode. While I strongly think that modern systems should not have potentially ambiguous key-sequences (i.e. cursor keys starting with the ESC key), most applications should at least consider the platform they were designed for.
When I am using a text editor, I want to minimize keystrokes - having to enter insert mode whenever I change lines will slow me down. The same applies to the legacy "notepad" methood of editing - having to block a line of text to cut-n-paste is a slowdown when C-X should immediatly cut the line being worked on (as done in MSVC 2005.)
The best editor is a hot-rod. Nuff said.
Re:Unix console text editors are annoying (Score:4, Interesting)
You mean libgpmg1. That's not related to GTK in any way (thank god).
Personally, I am happy with nvi(1), "a 'bug-for-bug compatible' clone of the original BSD vi". No strange dependencies there. But then I use emacs for all longer editing sessions.
Old networks (Score:3, Interesting)
my story (Score:3, Interesting)
When I was forced to learn unix, I chose pico.
When I learned more about the GPL and linux I chose nano (a whole three orders of magnitude better).
When I figured out that most of the physics and astronomy I do involves coding, I tried Emacs.
When I found machines that didn't have Emacs or a network connection, I was shocked and horrified
(these are remarkably common in the astronomy world though you wish they weren't)
With no other recourse, I forced myself to learn vi(m). The vimtutor and docs were my friend.
Now I do not need them. I learned the keys. Then I forgot them. My fingers remember though...
J'y suis, j'y reste.
Re:Hard to learn but worth it (Score:3, Interesting)
Re:So let the flame wars begin! (Score:5, Interesting)
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 ?
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.
Re:So let the flame wars begin! (Score:3, Interesting)
When your GUI is broken, either through driver problems, pathetic network speed or any other reason.
Anyway, I personally learnt vi in 1978, when it was a privilege to be allowed to use a screen editor, as opposed to a line editor (ed). That was after spending a year programming using punch card input. Anyway, you can find a cheat card to remind you of the basic commands, and the real power is in regular expressions, which are useful in many other contexts, perl hacking for a start. Even MS Word has a bastardised form.
"vi" wasn't first, but it was free. (Score:4, Interesting)
Long before Bill Joy, UNIX had a good full-screen editor - the RAND editor [rand.org]. The RAND editor dated from the early 1970s. [faqs.org] I used it at Ford Aerospace, and it was much nicer than "vi". But it wasn't free. You had to pay RAND for each copy.
The RAND editor was much closer to "what you see is what you get" than "vi". It was a full-screen editor with all the commands on function keys. All the keys like "insert", "delete", etc. did what you'd expect. Labels were provided to show what each function key did. So it was far more user-friendly than "vi".
The RAND editor was modestly portable from terminal to terminal. It worked best on HP terminals of the period, and was table driven so that it could support different devices. But you had to change the tables in C and rebuild to add support for a new device.
The RAND editor had fewer "mode" issues than "vi". What you typed went in at the cursor position. For a few special commands, like "find", a special line at the bottom of the screen was used. But you could always see visually what was going on. Much better look and feel than "vi".
Those of us who had both available used the RAND editor.
Some of what Joy is credited for in the early days of UNIX reflects the fact that he worked for a tax-funded organization working under a contract that allowed them to give software away.
Re:I use both Vi (vim) and Emacs. Brief is better (Score:4, Interesting)
Any wonder Borland is about to go bankrupt?
Re:From vi to vim, now back again to vi (Score:1, Interesting)
The Unix Heritage Society has the original source code [tuhs.org]. Get the file 2bsd.tar.gz . It's a beautiful tarball. The timestamps in it go back to May 1979! Vi is located in the src/ex directory. This source code might be hard to compile, but Gunnar Ritter has added the needed changes to make it run on Linux. Try http://ex-vi.sourceforge.net/ [sourceforge.net]
Re:So let the flame wars begin! (Score:3, Interesting)
http://www.asktog.com/TOI/toi06KeyboardVMouse1.ht
We've done a cool $50 million of R & D on the Apple Human Interface. We discovered, among other things, two pertinent facts:
* Test subjects consistently report that keyboarding is faster than mousing.
* The stopwatch consistently proves mousing is faster than keyboarding.
This contradiction between user-experience and reality apparently forms the basis for many user/developers' belief that the keyboard is faster.