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
elvispathand loaded into a buffer namedElvis 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
:safelycommand sets thesecurityoption for execution of non-home-directory.exrc files, or any other untrusted files. Whensecurity=saferis ...