[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

AC.27 Emulation

GNU Emacs can be programmed to emulate (more or less) most other editors. Standard facilities can emulate these:

CRiSP/Brief (PC editor)
You can turn on key bindings to emulate the CRiSP/Brief editor with M-x crisp-mode. Note that this rebinds M-x to exit Emacs unless you change the user option crisp-override-meta-x. You can also use the command M-x scroll-all-mode or set the user option crisp-load-scroll-all to emulate CRiSP's scroll-all feature (scrolling all windows together).

EDT (DEC VMS editor)
Turn on EDT emulation with M-x edt-emulation-on. M-x edt-emulation-off restores normal Emacs command bindings.

Most of the EDT emulation commands are keypad keys, and most standard Emacs key bindings are still available. The EDT emulation rebindings are done in the global keymap, so there is no problem switching buffers or major modes while in EDT emulation.

"PC" bindings
The command M-x pc-bindings-mode sets up certain key bindings for "PC compatibility"---what people are often used to on PCs--as follows: Delete and its variants delete forward instead of backward, C-Backspace kills backward a word (as C-Delete normally would), M-Backspace does undo, Home and End move to beginning and end of line, C-Home and C-End move to beginning and end of buffer and C-Escape does list-buffers.

PC Selection mode
The command M-x pc-selection-mode enables a global minor mode that emulates the mark, copy, cut and paste commands of various other systems--an interface known as CUA. It establishes the key bindings of PC mode, and also modifies the bindings of the cursor keys and the next, prior, home and end keys. It does not provide the full set of CUA key bindings--the fundamental Emacs keys C-c, C-v and C-x are not changed.

The standard keys for moving around (right, left, up, down, home, end, prior, next, called "move-keys") deactivate the mark in PC selection mode. However, using Shift together with the "move keys" activates the region over which they move. The copy, cut and paste functions are available on C-insert, S-delete and S-insert respectively.

The s-region package provides similar, but less complete, facilities.

TPU (DEC VMS editor)
M-x tpu-edt-on turns on emulation of the TPU editor emulating EDT.

vi (Berkeley editor)
Viper is the newest emulator for vi. It implements several levels of emulation; level 1 is closest to vi itself, while level 5 departs somewhat from strict emulation to take advantage of the capabilities of Emacs. To invoke Viper, type M-x viper-mode; it will guide you the rest of the way and ask for the emulation level. See Info file `viper', node `Top'.

vi (another emulator)
M-x vi-mode enters a major mode that replaces the previously established major mode. All of the vi commands that, in real vi, enter "input" mode are programmed instead to return to the previous major mode. Thus, ordinary Emacs serves as vi's "input" mode.

Because vi emulation works through major modes, it does not work to switch buffers during emulation. Return to normal Emacs first.

If you plan to use vi emulation much, you probably want to bind a key to the vi-mode command.

vi (alternate emulator)
M-x vip-mode invokes another vi emulator, said to resemble real vi more thoroughly than M-x vi-mode. "Input" mode in this emulator is changed from ordinary Emacs so you can use ESC to go back to emulated vi command mode. To get from emulated vi command mode back to ordinary Emacs, type C-z.

This emulation does not work through major modes, and it is possible to switch buffers in various ways within the emulator. It is not so necessary to assign a key to the command vip-mode as it is with vi-mode because terminating insert mode does not use it.

See Info file `vip', node `Top', for full information.

WordStar (old wordprocessor)
M-x wordstar-mode provides a major mode with WordStar-like key bindings.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 2, 2002 using texi2html