Vi is probably the most powerful text editor for *NIX, but if you have ever tried to use it, you probably walked away frustrated. This article walks through all the capabilities and features of Vi - from the basics, such as saving and quitting, to the more advanced topics of searching for strings.
Vi is a "visual editor" - an editor which lets you view a document, in its entirety, as you create and edit it. Those of you from the Microsoft Word generation might find that a little redundant - surely, you're thinking, all editors let you do that! Well, not exactly - in the early days of UNIX, line editors like edlin and ex were pretty standard, and creating a document in one of those babies involved using arcane commands to add, remove and retrieve text from an invisible buffer.
Times change, and almost all Unices today ship with some variant of vi - it's easily one of the most powerful editors out there, with a whole bunch of useful and interesting features. In my lighter moments - and they're few and far between, mind you! - I've been known to call it the Ferrari of text editors; it's fast, it's stylish, and once you know how to drive it, you'll never have any trouble finding a date on Saturday night...
Ah, I see you liked that analogy. Good, good...I have a feeling we're going to get along just fine!
The variant we're going to be dealing with throughout this course is called vim, which stands for "Vi IMproved"; since I'm going to be giving you a lot of homework, I suggest that you get yourself a copy of the latest version from http://www.vim.org as soon as possible. You might also like to take a look at the numerous other variants: elvis, at ftp://ftp.cs.pdx.edu/pub/elvis/; and vile, at http://dickey.his.com/vile/vile.html, are two of the better ones. While these clones are, by and large, true to the spirit of the original vi, many of them offer additional improvements and enhancements as well.
Oh yes - although we'll be using vim throughout this course, I'll be referring to it as vi. This quirk is just one of the many reasons women find me so attractive.
This article copyright Melonfire 2000. All rights reserved.