(evi.info)Emacs commands


Next: Emacs editing modes Prev: Window management Up: Top

Accessing emacs commands
========================

   By default, no emacs commands are accessible from Evi.  However, the
three main classes of emacs commands can easily be made accessible by
adding selected elisp commands suggested below to your .evirc file.

   The `C-x' prefix commands integrate most easily with Evi since it
would only override kill-line in input modes.  To access `C-x' prefix
commands in all modes, use:
     (evi-define-key evi-all-keymaps "\C-x" 'evi-emacs-command)
   The Meta (or ESC prefix) commands are no problem if you just want to
access them from the top-level, where in vi ESC only serves the purpose
of ringing the bell, which in vi is a handy way of verifying that you're
in command mode, but is not vital considering the emacs mode line.  Use
the following to access Meta (or ESC prefix) commands only from the
top-level:
     (evi-define-key '(top-level) "\e" 'evi-emacs-command)
   Accessing Meta (or ESC prefix) commands from other modes is
problematic because ESC is the command to exit that mode.  However, if
you wish, you can redefine the meta prefix to something else - I
recommend `C-a'.  Thus to use Meta commands in all modes use:
     (setq evi-meta-prefix-char ?\C-a)
     (evi-define-key evi-all-keymaps "\C-a" (cons (current-global-map) ?\e))
   The `C-c' prefix commands are also problematic because `C-c' is vi's
interrupt character.  At the top-level, this is again not much of a
problem, and you could use:
     (evi-define-key '(top-level) "\C-c" 'evi-emacs-command)
   `C-c' will still function as an interrupt character at all other
places (including in the middle of a command, where it's most useful).
In the various input modes you could forego `C-c' as your interrupt
character and access the `C-c' prefix commands by using the following
(presumably in addition to the above):
     (evi-define-key '(input replace ex) "\C-c" 'evi-emacs-command)
   Note that setting evi-insert-mode-local-bindings (described in the
next section) will have the same effect because all `C-c' commands are
local bindings.


automatically generated by info2www