(lemacs.info)evi Mode


Prev: Emulation Up: Emulation

Using evi Mode
--------------

   In Lucid Emacs, evi provides vi emulation within Emacs.  By default,
evi-mode is as close as possible to regular vi.  To start evi mode from
Emacs, type `M-x evi'.  If you want be in evi mode whenever you bring
up Emacs, include this line in your `.emacs' file:
     (setq term-setup-hook 'evi)

   You can find a customization file for evi-mode in `~/.evirc'.  This
file has to contain Lisp code, just like the `.emacs' file, and is
loaded whenever you invoke evi mode.  The file allows you to rebind
keys in evi mode, just as you can in other Emacs modes.

   Note that evi also loads a file of vi commands from `.exrc', just
like vi.

   By default, all Emacs commands are disabled in evi mode.  This
leaves you with only vi commands.  You may customize evi mode to make
certain keybindings accessible.  For example, to enable all Emacs
command sequences that begin with `Control-x' or with `Meta', include
the following lines in your `.evirc' file:
     (evi-define-key evi-all-keymaps "\C-x" ctl-x-map)
     (setq evi-meta-prefix-char ?\C-a)
     (evi-define-key evi-all-keymaps "\C-a" esc-map)

   When you are in evi mode, typing `Control-z' stops vi emulation,
leaving you in Emacs.  To get back into evi mode, use `Meta-x evi'
again.  To exit Emacs, use `Control-x Control-c'.

   The file management commands used by vi have been adapted to Emacs.
They have slightly different meanings than the vi commands themselves:

`:e'
     Edit a file in the current window.  With no argument, brings in a
     new copy of the file, if it has been subsequently modified on disk.
     `:e' overrides any complaints about the current buffer being
     modified and discards all modifications.  With a filename
     argument, it edits that file in the current window, using the copy
     already in the editor if it was previously read in.  There is no
     difference between `:e!  filename' and `:e filename'.  As a
     shorthand for editing the most recently accessed buffer not in the
     window, use `:e#'.

`:E'
     Same as `:e', but edits the file in another window, creating that
     window if necessary.  If used with no filename, this command
     splits the current buffer into two windows.

`:n'
     Switch to the next file in the buffer list that is not currently
     displayed.  Rotates the current file to the end of the buffer
     list, so the command effectively cycles through all buffers.

`:N'
     Same as `:n', but switches to another window or creates another
     window and puts the next file into it.

   All `ex' commands that accept filenames as arguments perform file
completion using `SPC' or `TAB'.  Completion begins after the space
that separates the command from the filename.

   Many of the `ex' commands are not implemented.  The following
commands are implemented:
     cd, chdir, copy, delete, edit, file, global, map, move, next print,
     put, quit, read, set, source, substitute, tag, write, wq, yank, !, <, >

   The following `ex' options are implemented:
     autoindent, ignorecase, magic, notimeout, shiftwidth, showmatch,
     tabstop, wrapscan


automatically generated by info2www