Vi1 makes one major philosophical deviation from every other text editor I have come in contact with. The basic idea is that your hands don't have any business straying from the home row keys. This can be an advantage for the touch typist, but the guy who needs to see the letter on the key before pushing it down tends to be less enamored with this characteristic. Since your fingers can only reach about fifty (50) keys without moving your hands, and since vi has in excess of 100 commands, something drastic must be done in order to designate all the functions a decent text editor must have. Rather than relying on extra keys on your keyboard that seem a little too far away or special key combinations that involve keys that your keyboard may or may not have, vi simply assigns a couple functions to the keys in reach.
Vi operates in two modes 2 (insert and command) in order to determine which function should be performed when a key is pressed. This two mode novelty, in my opinion, is what causes some to confuse vi with the devil himself and causes others to place vi equal with God. Although I find it hard to justify worshiping a text editor, I can (after much effort) appreciate the utility of vi.
Why vi? Vi is the default editor for Unix. It is possible to use other editors, but if you learn vi you can be confident that it will be on any Unix machine you use. However, the same level of confidence with another editor may be shortlived. It would be to your advantage to learn at least the basics of vi. For those who use a text editor on a daily basis, particularly for programming, vi will become a joy to use after a few months of friendship building.
As with any friendship, an emphasis must be placed on quality time, not just quantity. Those who have little use for a text editor may be satisfied with a cold professional relationship with conversations limited to a few basic commands. The rest of us would certainly benefit from a little quality time with vi. By quality time, I don't mean merely having the same conversations over and over (repeating commands you already know). I don't mean just reading about what makes vi tick. Although these are important activities, I mean telling vi things you've never told it before and observing its response. Don't discuss important issues with vi until you're pretty sure you know how it will react. Make sure you make a backup copy of the file you experiment with.
The art of conversation is often a difficult thing for people. Whether it be a young man on his first date, a newlywed struggling to entertain her mother-in-law, a new manager trying to learn about what makes her employees tick, or a computer novice trying to build a new relationship with a idiosyncratic text editor, knowing what to say and when to say it can be a daunting task, particularly when you are responsible for initiating conversation. Some of you will know just what to say to Vi and others of you would rather run.
In what follows I have included an introduction to my friend Vi. Within you will see example conversations that we have had. Hopefully this will whet your appetite to develop your own relationship with Vi. In order to fully appreciate Vi you will need to be creative in starting new conversations that are not contained in this document. The reference section describes the limits of Vi's conversational abilities, and will hopefully provide you with some ideas for future conversations. In the miscellaneous tips section, I give you a glimpse of some of the deeper conversations that can take place. Please don't get me wrong though. These are more than just conversations. These conversations can have powerful results that should make your life run more smoothly.
2 Technically, there are three modes, but I have chosen to treat the command and line editor modes as one mode. The line editor commands are a carry-over from the ed/ex line editors.
© 1993-2000 Christopher C. Taylor