TABLE OF CONTENTS

  •  1. What is elvis? (includes a summary of special features)
  •  2. Visual command mode (by function or name)
  •  3. Input mode
  •  4. EX command mode (by function or name)
  •  5. Regular expressions (searches and substitutions)
  •  6. Options (by function or name)
  •  7. Display modes
  •  8. User interfaces
  •  9. Operating systems
  • 10. Sessions, initialization, and recovery
  • 11. Cut buffers
  • 12. Messages
  • 13. Arithmetic expressions (arithmetic, tests, and functions)
  • 14. Tags
  • 15. The Internet
  • 16. Tips
  •  A. List of terse messages
  •  B. Quick Reference
  •  C. How To...
  • elvis(1) Man-page for elvis
  • ctags(1) Man-page for ctags (or elvtags)
  • ref(1) Man-page for ref
  • fmt(1) Man-page for fmt
  • HINT: If you're reading this via elvis' built-in :help command, then you should probably begin by reading about :help itself. To do that, move the cursor onto the word ":help" and press the Enter key.

    .--------------------------------------------------------------.
    | Copyright © 1998 by Steve Kirkendall.  Permission is granted |
    | to use and distribute this software in either source code    |
    | form, or executable form, under the terms described in the   |
    | license.  The license is in the file "lib/license".  This    |
    | software is provided with no warranty of any kind.  The      |
    | author is not liable for any consequences arising from the   |
    | use of this software.                                        |
    ^--------------------------------------------------------------^
    

    You can contact the author via e-mail at kirkenda@cs.pdx.edu, or via postal mail at:

    Steve Kirkendall
    1500 SW Park Avenue, #326
    Portland OR 97201
    USA

    If you require technical support, you may get a quicker response by posting a message to the comp.editors newsgroup.

    1. WHAT IS ELVIS?

    Elvis is a clone of vi/ex, the standard UNIX editor. Elvis supports nearly all of the vi/ex commands, in both visual mode and ex mode. Elvis adds support for multiple files, multiple windows, a variety of display modes, on-line help, and other miscellaneous extensions.

    Like vi/ex, Elvis stores most of the text in a temporary file, instead of RAM. This allows it to edit files that are too large to fit in a single process' data space. Also, the edit buffer can survive a power failure or crash.

    Elvis 2.2 runs under the following operating systems:

    Elvis is freely redistributable under the terms of the Perl "Artistic" License, in either source form or executable form. See the license file for the details.

    1.1 About this manual

    This document is written in HTML. You should be able to view it with any Web browser, such as Mosaic or Netscape. These browsers also allow you to print the manual, if you prefer.

    You can also use elvis to view it or print it; elvis has a built-in HTML display mode. To print this document using elvis, you must first set some printer options. After that, you can just load any of these files, maybe set the display mode to HTML via the command ":display html" (if elvis doesn't set the display mode automatically), and then give the command ":lp".

    Each chapter is stored in a separate file; you'll need to print each one separately. A shell script/batch file named printdoc.bat is provided to help you do this.

    1.2 Overview of Elvis

    The user interface of Elvis/vi/ex is weird. There are two major command modes in Elvis, and a few text input modes as well. Each command mode has a command which allows you to switch to the other mode.

    You will probably use the visual command mode most of the time. This is the mode that Elvis normally starts up in.

    In visual command mode, the entire screen is filled with lines of text from your file. Each keystroke is interpreted as part of a visual command. If you start typing text, it will not be inserted, it will be treated as part of a command. To insert text, you must first give an "insert text" command, such as i. This will take some getting used to. (An alternative exists. Look up the initialstate option.)

    The ex mode is quite different. Elvis displays a ":" character on the bottom line of the screen, as a prompt. You are then expected to type in a command line and hit the Enter key. The set of commands recognized in the ex mode is different from visual mode's.

    1.3 Special features of Elvis

    Compared to the traditional ex/vi, elvis supports the following major new features:
    Multiple edit buffers
    You can edit several files at the same time. The :buffer ex command lists the current edit buffers. You can switch to a different buffer by typing :(buffername or :buffer buffername.
    Multiple windows
    The :split ex command or ^Ws visual command will create a new window showing the same edit buffer. You can use :split filename to edit a different file in a new window. Related commands allow you to do things like search for a tag and display it in a new window, or move among windows.
    Multiple user interfaces
    In addition to the traditional termcap user interface, elvis also supports graphical interfaces for X11 and Windows95, plus some other stripped-down interfaces.
    A variety of display modes
    The :display command lists the available display modes, and can set the display to a particular mode. The ^Wd visual command toggles between display modes.
    Online help
    This uses elvis' built-in "html" display mode to display the manual, which uses multiple fonts and hypertext links to improve readability. To access it, give the command :help. (But you already figured that out, didn't you?)
    Printing
    Elvis has a :lpr command, which prints text using any of the display modes. This means you can use it to pretty-print source code, print hex dumps of binary files, or format and print man-pages or HTML documents. It is easy to print a portion of a file instead of the whole thing. It supports a variety of printer types, plus a pseudo-printer type that generates HTML output. Before using this feature, you must set up the printer options.
    Highly configurable
    Elvis has a set of configuration scripts, each of which is run at a specific time. For example, elvis.ini is run when elvis starts up, and elvis.arf is run after reading a file. See the chapter on sessions for a discussion of these.

    There is also an elvis.msg file which can be used to translate the built-in messages into another language.

    The X11 interface has a fully configurable toolbar.

    The elvis.syn file contains descriptions of various languages, for use with the syntax-coloring display mode.

    Enhanced tags
    The tags feature has been extended to support overloaded tags, which C++ tends to use a lot. See the tags chapter.
    Macro debugger
    To help you develop keyboard macros (and also report incompatibilities between elvis and vi), elvis has a built-in macro debugger. The the article in the Tips chapter.
    Network support
    Elvis can read via the http protocol, and read/write via the ftp protocol. See the Internet chapter.

    You can also make your own URL protocols, by defining aliases which implement the reading and writing operations. See the discussion in the Tips chapter

    Aliases
    You can construct csh-style aliases for the ex commands, via the :alias command. See the article in the Tips chapter.
    New options
    Elvis has roughly 200 different options. See the Options chapter for a list. Some of the highlights are:
    Built-in calculator
    Elvis has a :calc command which evaluates C-like expressions. These expressions are also used for some other commands, such as :if and :eval, among other things. See the Arithmetic expressions chapter.
    Text objects
    Elvis supports text objects. This offers a slightly more intuitive way to use the standard vi operator commands.
    Folding
    Folding offers you a way to temporarily hide parts of your text without actually deleting it. You can define foldable regions, and then fold them or unfold them easily any time after that. For more information, see the :fold and :unfold ex commands, and the <Tab> vi command.
    Spell checker
    Elvis can be compiled with a built-in spell checker. When editing source code, function names and data types are checked against the "tags" file, but comments are checked against both a natural-language dictionary and "tags". This is highly configurable.
    Auto commands
    You can configure elvis to execute commands automatically when certain events occur. See the :autocmd command.
    Improved :map command
    The standard :map command has been extended to allow you to set up maps for different contexts, or change the behavior of individual maps.
    Regions
    You can alter the highlighting for any regions of text that you want, for any reason that you want. For example, you can cause changed lines to be displayed with a different background color.