George V. Reilly

20 Years of Vi

vi. Vee-eye. My text editor of choice for 20 years. Half my life.

Why? Because I imprinted on vi, like a duckling on its mother. Vi’s keystrokes are bound into my muscle memory. My fingers re­flex­ive­ly use vi keystrokes to move around, to delete text, to move blocks, to find patterns. I don’t have to think about using dw to delete a word, or n to find the next match of a pattern, or yG to yank the rest of a file, or j to move down a line, or . to repeat the last mod­i­fi­ca­tion. My sub­con­cious does it for me.

I don’t even have to think much about more complex commands, like ct) to replace a parameter list, or simpler regexp re­place­ments. I’ve in­ter­nal­ized so many vi idioms in the last two decades.

For nearly all editing tasks, I’m far more productive when I use vi. Like Tom Chris­tiansen, I can become at one with the machine.

People who’ve used vi fall into a bimodal dis­tri­b­u­tion. They love it or they hate it. Usually, it’s because of vi’s modal nature. I love the or­thog­o­nal­i­ty of the UI.

20 years

In the autumn of 1985, I entered my third year of Computer Science at Trinity. We were promoted from three hours a day on the 1200-baud terminals in the basement to all-day usage of the 9600-baud terminals in the main terminal room. We also graduated from the wretched SOS line editor to vi running on Eunice (a Unix emulator for VAX/VMS). I don’t think I took to vi instantly; it took a little while for it to grow on me. Soon enough, though, I was hooked on regexps.

Hitting ESC quickly became a habit: one that causes me occasional grief, when I re­flex­ive­ly hit ESC after entering text in an edit field in some app or other, and destroy what I’ve just written.

Two years later, I got my first fulltime job, writing a full-screen text editor for a small Irish type­set­ting company, ICPC. It was a re­place­ment for the in-house line-based editor used by the data entry keyboaders, which I wrote in Vax Pascal. A friend made me aware of VITPU, a Vi emulator written in VMS’s TPU, which I gladly latched onto.

Two years after that, I entered the Master’s program at Brown, where I first got to use Unix and X Windows. Naturally, I used vi, but it was a lot less powerful than GNU Emacs, which was very popular. In time, I learned of VIP, a vi emulator for Emacs. I began using VIP and quickly forsook standard vi. I liked having the power and cus­tomiz­abil­i­ty of Emacs, though I never learned to like the Emacs key­bind­ings. (François Pinard, a longtime Emacs user, writes eloquently of why he moved to Vim.)

I stayed with VIP for years, as it evolved into Viper. I show up in the Viper credits for occasional con­tri­bu­tions.

In 1992, I moved to Seattle and worked for Microsoft for the first time. I kept my Emacs+Viper habit.

Vim

By 1995, I was working for Mi­cro­Crafts and had discovered Vim. Version-3.x ran on DOS as a 16-bit command-line app. I used it oc­ca­sion­al­ly on NT. Then I discovered that Roger Knobbe had ported Vim to NT, but that it was pretty buggy. I fixed the bugs and submitted my fixes to Bram Moolenaar, Vim’s author.

One thing led to another, and I became the Win32 guy for Vim-4.x. Console-mode Vim became rock solid on NT 4, but I never got it to the same level on Win95, due to inherent problems in the console APIs on Win9x. I also put together a proof-of-concept im­ple­men­ta­tion of gvim-5.0 for Windows. At that point, I gave up active in­volve­ment in the de­vel­op­ment of Vim: I had moved back to Microsoft, I was starting to date Emma, and I was working on the Beginning ATL COM Pro­gram­ming book. Something had to give.

I continued using Viper for much of the time that I was developing Vim, because Vim was not then rich enough for my needs. After Vim got a scripting language (VimL) and syntax high­light­ing in version-5, I started using Vim more and more. I think it’s been five years since I last used Emacs, and I never got beyond GNU Emacs-19.34.

Recently, I’ve stopped using Vim as my exclusive pro­gram­ming editor, and I’ve been al­ter­nat­ing between Vim and Visual Studio plus Resharper, as I’ve started doing a lot of .NET de­vel­op­ment. But more on that some other time. This post is already too long.

blog comments powered by Disqus
25 Dumbest Political Quotes of 2005 » « Curing Hiccups