Reorganized Pages (3/1999)
vi Information & Resources
I use the vi (pronounced "vee-eye") text editing program when working on Unix systems. After trying pico and emacs, I settled on vi in 1990 as a good compromise between features, speed, and learning curve. Since then I've found my choice to have been reasonable in terms of my original criteria. In addition to this vi page, I also have a Vim page devoted to my favorite vi editor. --Kent Nassen, knassen AT umich DOT edu
A Short Description of vivi is a full-screen text editor originally written to run under Unix, but it has been cloned and imitated to run under MS-DOS, Windows, OS/2, Macintosh OS, Unix, and several other operating systems as well. vi is unusual in that it has two modes: an input mode in which text may be inserted, appended, or overwritten, and a command mode in which the user may issue searches and/or replacements of text, move around the file being edited, delete and copy text, perform file operations (read/write/save), and invoke external Unix commands (such as sort, date, and fmt).
Up and Running Fast, But Powerful
Basic editing tasks with vi (opening a file, moving around, inserting text, deleting text, saving the file) can be learned in a few minutes, but mastering this editor will take much longer since it is relatively feature-rich and it can draw upon the full power of Unix, including regular expressions, reading the output of unix commands, and allowing unix commands to operate on the text being edited, as well as macros/key mapping, and ex line editor commands.
Bizarre and Incomprehensible...
vi can seem rather bizarre, incomprehensible, and confusing to people just learning it, especially if they are used to single-mode editors such as emacs, the MS-DOS editor, Windows Notepad or Wordpad, xedit, Qedit/TSE, Multi-edit, Ultraedit, and the like. I know it took me a while to get used to the h j k l cursor keys and switching back and forth between command mode and input mode. At some point, however, if you have the right sort of sticktoitiveness eventually you stop thinking so much about the commands you are typing. At that point, you're off to the races.
...or Fast and Efficient?
vi can be a very fast and efficient editor once you get used to the way it works. I like the idea that it is economical of system resources (RAM), that it can do a lot of editing in very few keystrokes (no mouse required) often without taking your fingers off the main part of your keyboard, that it can edit huge files, it can operate quite handily over slow modem or internet connections (which seems to be necessary more often than one would expect) and that I can find vi on every Unix system I've come across (and I use at least four different Unix operating systems on three different platforms currently).
The vi Stuff: Get To It, Already!
Below are some references and links of interest to vi users and the curious. I've included some screen shots of several popular vi clones, too, as at least some vee-eyes now offer GUI (graphical) interfaces with pull-down menus or button bars that might be of interest to a new generation of potential vi users.
I own published copies of both of these books, and I find each of them excellent in its own way. The Lamb book is what I started with...well, actually, I started with the brief vi and ex command summaries in the 1990 printing of Unix in a Nutshell by O'Reilly & Associates and puzzled my way along until I got Lamb's book. I purchased the H-P book later, after I already knew enough to get through a work day using vi without looking at a manual, but that book has still been useful for its clear explanations.
Hewlett-Packard Company (1990, The Ultimate Guide to the vi and ex Text Editors (Redwood City, CA: Benjamin/Cummings Publishing Co.).
- 11 Chapters, plus an appendix on regular expressions. This book takes a task-oriented approach to teaching the use of the vi and ex editors and includes many examples.
Lamb, Linda and Arnold Robbins (1998), Learning the vi Editor 6th ed. (Sebastapol, CA: O'Reilly & Associates), 348 pp.
- Starts with a beginner's tutorial and works up to using ex, global replacement, and advanced editing techniques. The 6th edition now includes information on several vi-clones: nvi, elvis, vim, and vile.
Artymiak, Jacek (2008), vi(1) Tips - Essential vi/vim Editor Skills (Poland: Lublin), 101 pp.
- A vi book that focuses on getting you up to speed quickly by avoiding confusing terminology. Includes plenty of illustrations and step by step instructions for file operations, cursor movement, and editing operations. A good place to start if you are using vi/vim for the first time. Also includes more intermediate vi/vim usage. See: http://devguide.net
Also of interest for vi users is:
Friedl, Jeffrey E.F., Mastering Regular Expressions (Sebastapol, CA: O'Reilly & Associates), 340+ pp.
- This must be the most comprehensive tutorial and reference about regular expressions published to-date. It includes in-depth explanations of how regular expressions do their work and many descriptions of the various unix tools that incorporate regular expressions (such as vi). This book really gets to the method behind the madness of regular expressions and is an excellent reference.
The vi FAQ~
This is a link to an HTML version of the vi Frequently Asked Questions (FAQ) file. This should answer most of the questions that people ask when becoming familiar with vi and as such, is a good starting place to learn more (in addition to the links below). The most recent vi FAQ can be retrieved from rtfm.mit.edu but it has not been converted to HTML.
Unix is a Four Letter Word and VI is a Two Letter Abbreviation
An introduction to both Unix and VI. Skip right to the vi tutorial if you want. It includes the basics of vi usage, as well as Maarten Litmaath's vi reference, and miscellaneous vi tips.
UnixWorld VI Tutorials
This tutorial series starts with the fundamentals of editing with vi. This page has links to all the installments. Other installments include topics such as global operations, line mode addressing, substitution, replacement, setting up the vi environment, editing in columns, and macros.
The vi Archive (FTP)
This is a link to the mirror at ftp.uu.net of the alf.uib.no official vi archive. The archive includes tutorials & command summaries, macros, source code, and the comp.editors tip collection. Here is my unofficial HTML version of the archive index (approx. 32K HTML) which gives a brief description of, and links to, the files there.
vi Lover's Home Page
The place for all things vi, by Thomer M. Gil (email@example.com). Links to many vi resources, sources, binaries, stories, FAQs, manuals, and tutorials. Highly recommended!
vi Reference Mugs
If you love vi, you've got to have one of these mugs on your desk!
The Quine Page
A page devoted to programs which reproduce their own source code. Includes several examples of quines for vi/vim/nvi/elvis.
My little vi page
A litte vi page with links to vi-related sites.
Sven Guckes' vi Pages
Information on various vi versions and clones, vi quotes, vi folklore, the vi vs. emacs religious war, vi documentation, and the vi picture gallery.
The VIM Home Page
VIM is Vi-IMproved, a free vi clone with many extensions and great features such as multi-level undo, multiple windows and buffers, flexible insert mode (use the arrow keys to move while in insert mode), visual mode (execute commands on marked areas of text), block operators (operate on rectangular blocks of text), and online help system. Vim 5.4 is currently being tested, and looking good. The new 5.x versions offer bug fixes and many improvements to the editor in general. In comparison to Vim 4.x, the 5.x versions offer syntax highlighting for many languages, a GUI interface (gvim), pull-down menus, an internal scripting language, and the opportunity to include perl or python as an interpreter. Bram Moolenaar (firstname.lastname@example.org) is the principal author of VIM and coordinator of VIM programming efforts. [v5.4 SCREEN SHOT 19K PNG]
Eli's Vim and vi Page
Eli the Bearded presents vi as only he can, including Conway's Game of Life for vi! [SCREEN SHOT, 7K PNG] Also there are examples of "Hello, world" in vi, the Towers of Hanoi puzzle solver vi macros, and a couple different sets of HTML macros for vi. This site leans heavily toward VIM, but has a lot of "true" vi content as well. This link no longer works, can't find a replacement for these pages. [06/2000]
nvi is the latest incarnation of vi from U.C. Berkeley (it's the vi that ships with BSD 4.4). nvi is free and can use perl as an extension language. Handles lines longer than 1024 characters now, which I've found to be a tremendous improvement (many of the vi clones can also handle really long lines, too). In addition, nvi supports multiple buffers, unlimited undo, is 8 bit clean, and has command-line editing and filename completion. Current version is 1.79. Nothing fancy about the way nvi looks...plain ol' vi in a terminal window; I didn't expect you'd need a screen shot of that. Also included at this site is the vi FAQ.
/ Elvis (ftp alternate, faster)
Elvis [V2.0 SCREEN SHOT 14K PNG]is a free vi clone written by Steve Kirkendall (email@example.com) that offers multiple buffers, multiple windows, and multiple display modes. In its most recent incarnation (beta test v2.1g -- this is the first 2.1 beta, meaning all 2.1 features have been added and the only changes will be bug fixes) it provides a very nice X11 interface with a user-definable button bar, syntax highlighting, pop-up dialog windows, and hex editing. Elvis 2.1 can view and print a significant subset of HTML (its help system is written in HTML). This editor has come a long way in the last year or so, so if you haven't tried it recently, you should now. Version 2.0 is the most recent release version (binaries are available for MS-DOS and Win32, source code for Unix). Version 2.0 has most of the features of 2.1, although the menubar has become more versatile in 2.1 (the 2.1 beta version is in the "unreleased" directory).
A home page devoted to the Elvis editor, including the Elvis manual, screen shots of Elvis on various platforms, links to the Elvis source code, and other Elvis-related information.
Vile and XVile (ftp)
vile stands for "vi like emacs." It is a free vi-like editor with many emacs-like features. It has a very vi-like "finger feel" according to its author, although it does not attempt to be a complete vi clone. vile includes multi-file editing and viewing, key rebinding, mouse support (in an xterm, or when built as xvile), infinite undo, selection highlighting, rectangular operations, "next error" cursor positioning after compilation, full function-key and arrow-key support, filename & command completion, command/search string/filename history, auxiliary utilities for man page and C program syntax highlighting, built-in macro language, and an interface to Perl. vile ports to all UNIX platforms, VMS, and DOS. xvile [SCREEN SHOT 11K PNG] is the X11 version of vile, which adds scrollbars, more complete mouse capabilities, and menus when Athena or Motif widget libraries are available. vile and xvile were reviewed in the March 1996 Linux Gazette. Vile is available for DOS, Win95/NT, OS/2, and as source code for Unix and other operating systems.
Lemmy: A Unix vi for Windows 95 and NT
Lemmy [V2.0 SCREEN SHOT 15K PNG]is a rather interesting twist on the vi theme. It is a vi editor with a windows interface for Win 95 & NT [V3 SCREEN SHOT 10K PNG] (and until recently, Win32s--couldn't find that version last time I looked). Custom (fixed-pitch) fonts, unlimited undo/redo, user-definable & extendable syntax highlighting, and the obligatory Windows-style pull down menus are available, among other features. This is another vi clone that has seen lots of improvement in the past year. The author is James Iuliano, who keeps some lemmy information and tips at his home page. Lemmy v3.0, however, is now being marketed by Software Online, Ltd. and a single-user license, which removes nags and affords free upgrades, costs $20 (other licenses available). Lemmy v4.0(Beta) is now available (4/99).
WinVi for Win95/NT and Win 3.1
WinVi [V2.63 on Win95 SCREEN SHOT 60K JPG] is a free Windows vi clone that was designed to be compatible with the Windows Notepad editor. It offers such features as fast startup (does not use DLLs), can edit files as large as virtual memory, background may be set to a bitmap image, and selectable (including True Type) fonts. This editor is still in the relatively early stages of development and does lack true vi compatibility. For example, macros & abbreviations are not available currently. Also, only one active file can be edited for each instance of WinVi running. Still, this is another interesting adaptation of vi to the Windows environment and one to watch as it improves. Versions are available for 16-bit and 32-bit Windows.
Oak Hill Vi
Oak Hill vi is a shareware vi that is available in DOS and Win95/NT 32-bit console versions. It costs $35 to register, which gains the user free upgrades, no more nags, & user support via e-mail. This program, in its Win32 console version, can edit very large files (DOS version is limited to 250,000 characters). Other features include 8-bit ASCII support, 43/50 line display, and on-line help.
According to its authors: "Xvi [SCREEN SHOT 8K PNG]is a portable free multi-window version of `vi'. In spite of its name, there is, as yet, no X-Windows-specific version of it, but work is reputedly still in progress. Existing versions use text windows separated by horizontal status lines on character mode displays. The windows may represent different files being edited, or different views on to the same file." Here is a local copy of the source for xvi 2.19 and the obligatory screenshot [SCREEN SHOT 7K PNG]: xvi219.tgz.
The source code for xvi 2.15, as well as binaries for MS-DOS, are also available from the vi archive. Xvi was actually my first vi clone experience. It hooked me with its multiple windows and ability to cut and paste between windows. Unfortunately, xvi had a number of incompatibilities with "true" vi, so I moved on to other clones, and of course, "true" vi. Anyway, xvi is still a very serviceable editor with some handy features, including a small memory usage and multiple buffers.
xvi also has a Sourceforge site: xvi.sf.net.
xvi-2.47 for DOS, with one bug fix, can be found here in the zip file xvi2471_dos.zip.
JAVI [link doesn't work, can't find other location]
An implementation of vi in Java. Can be run as an applet or an application.
comp.editors is a Usenet newsgroup devoted to text editors. Although this newsgroup is for almost any kind of editor for any system, much discussion of vi takes place here: How do I do task Y in vi? Where can I find...? What's wrong with my macro? and other topics, including the perennial vi vs. emacs editor wars.
[The screen shots above, with the exception of the Lemmy and WinVi screen shots (which were grabbed while running Windows 3.1 or Win 95), were grabbed while each application was running under XFree86 and the FVWM-95 window manager. Elvis, and xvile obviously have been set to similar color schemes in my .Xdefaults file.]
"vi.html" 409 lines, 19975 characters
Back to Kent's Home Page
This vi page has been visited times since December 26, 1997.