Introduction to VI
vi (pronounced ``vee eye'') is really the only editor you can find at almost every Unix installation. It was originally written at the University of California at Berkeley and versions can be found it almost every vendor's edition of Unix, including Linux. It is initially somewhat hard to get used to, but it has many powerful features. In general, we suggest that a new user learn Emacs, which is generally easier to use. However, people who will use more than one platform or find they dislike Emacs may want to try to learn vi. A brief historical view of vi is necessary to understand how the key [ k ] can mean move cursor up one line and why there are three different modes of use. If you are itchy to learn the editor, then the two tutorials will guide you from being a raw beginner, through to having enough knowledge of the command set you are ever likely to need. The chapter also incorporates a command guide, which makes a useful reference to keep by the terminal. Even if vi does not become your regular text editor, the knowledge of its use is not wasted. It is almost certain that the Unix system you are using will have some variant of the vi editor. It may be necessary to use vi while installing another editor, such as Emacs. Many Unix tools, applications and games use a subset of the vi command set.
A Quick History of VI
Early text editors were line oriented and typically were used from dumb printing terminals. A typical editor that operates in this mode is Ed. The editor is powerful and efficient, using a very small amount of computer resources, and worked well with the display equipment of the time. vi offers the user a visual alternative with a significantly expanded command set compared with ed.
vi as we know it today started as the line editor ex. In fact ex is seen as a special editing mode of vi, although actually the converse is true. The visual component of ex can be initiated from the command line by using the vi command, or from within ex.
The ex/vi editor was developed at the University of California at Berkeley by William Joy. It was originally supplied as an unsupported utility until its official inclusion in the release of AT &TSystem 5 Unix. It has steadily become more popular, even with the challenges of more modern full screen editors.
Due to the popularity of vi there exists many clone variants and versions can be found for most operation systems. It is not the intention of this chapter to include all the commands available under vi or its variants. Many clones have expanded and changed the original behaviour of vi. Most clones do not support all the original commands of vi.
If you have a good working knowledge of ed then vi offers a smaller learning curve to master. Even if you have no intention of using vi as your regular editor, a basic knowledge of vi can only be an asset.
