BELUG > vi > previous

vi Clones

There are a number of "clones" of the vi editor. This term refers to programs with a similar appearance and functions but which were written from scratch with completely new source code.

The vi clones were written because the source code for the original version was not freely available until recently. This made it impossible to extend the functionality of vi. It also precluded porting vi to other operating systems, including Linux.

The list of vi clones includes calvin, elvis, elwin, lemmy, nvi, stevie, vile, viper and Vim. Vim is possibly the most popular, and it is included in Red Hat Linux and many other distributions. nvi is the "official" Berkeley clone of vi, and it is included in FreeBSD and the other BSD variants.

calvin is a freeware "partial clone of vi" for use on MS-DOS. It has the advantages of small size (the .exe file is only 46.1KB!) and fast execution but the disadvantage that it lacks many of the ex commands, such as search and replace.

lemmy is a shareware version of vi implemented for the Microsoft Windows platforms which combines the interface of vi with the look and feel of a Windows application.

The clones add numerous new features which make them significantly easier to use than the original vi, especially for neophytes. A particularly useful feature in many of them is the ability to edit files in multiple windows. This facilitates working on more than one file at the same time, including cutting and pasting text among them.

Many of the clones also offer GUI versions of vi that operate under the X Windows system and can take advantage of bit-mapped (high resolution) displays and the mouse.

Additional features in the clones that make editing easier and more powerful include (1) the ability to edit ex commands as they are typed, (2) command completion, (3) unlimited line length, (4) the ability to let long lines trail off the edge of screen instead of wrapping, (5) the ability to search for text while typing the search pattern, (6) visible indication of the mode (i.e., insert or command), (7) indicators for the current line and column, (8) a recallable command history, ((9) the ability to edit binary and/or executable files and (10) infinite levels of undo.

Despite the many added features of the clones, there are some important reasons to first become proficient in the original vi. One is that the core commands in the original version are also used in all of the clones. Thus by learning vi, you are also learning the most important part of the clones, and it should then be easy to use any clone productively.

Another is that there may be situations in which the original version of vi is the only editor available. For example, you may be dealing with an older Linux installation which only uses the original version or with an ultra-compact Linux installation (such as one that resides in an embedded system or on a single-floppy disk) where there is no room for clones because of their larger memory requirements.