O'Reilly logo

Learning the vi and Vim Editors, 7th Edition by Linda Lamb, Elbert Hannah, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interesting Features

elvis has a number of interesting features:

Internationalization support

Like nvi, elvis also has a home-grown method for allowing translations of messages into different languages. The elvis.msg file is searched for along the elvispath and loaded into a buffer named Elvis messages.

Messages have the form “terse message:long message.” Before printing a message, elvis looks up the terse form, and if there is a corresponding long form, that message is used. Otherwise, the terse message is used.

Display modes

This is perhaps the most interesting of elvis’s features. For certain kinds of files, elvis formats the file content on the screen, giving a surprisingly good approximation of a WYSIWYG effect. elvis can also use the same formatting for printing the buffer to several kinds of printers. Display modes get their own subsection later in this chapter.

Pre- and post-operation command files

elvis loads four files (if they exist) that allow you to customize its behavior before and after reading and writing a file. This feature also gets its own subsection, later.

Open mode

elvis is the only one of the clones that actually implements vi’s open mode. (Think of open mode as like vi, but with only a one-line window. The “advantage” of open mode is that it can be used on terminals that don’t have cursor motion capabilities.)

Security

The :safely command sets the security option for execution of non-home-directory.exrc files, or any other untrusted files. When security=safer is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required