computer keyboard icon The GNU Emacs Text Editor
'Cheat Sheet'
for VMS EVE Users

Computing
& Information
Services
author: Bill.Costa@unh.edu

Nomenclature

Page Not Found! | University of New Hampshire

Page Not Found!

Oops! It looks like that page is missing or that link is incorrect. Please use the search method provided above, or the available links, to find the information you seek. Let us know if you can't find something.

Conventions for representing special characters shown in the Key-Sequence entries, are modelled after those used in the book Learning GNU Emacs. Most Emacs manuals, and the internal Emacs help facility, however, refer to the ESC key as the META key and represent it as "M-". Thus the equivalent of the Digital VT terminal DO key is M-x which is produced by pressing and releasing the ESC key, followed by the letter x.

Command Groups

Starting/Stopping Emacs

Key-Sequence
  DO command
  Description
emacs file-name
n/a Start Emacs on zero or more files. Specify a directory to 'edit' it.
C-x C-c save-buffers-kill-emacs Exit; prompts to confirm saving any modified buffers.
C-z suspend-emacs Suspend; use shell command fg (foreground) to return to editing session.

 
 

Error Recovery

Key-Sequence
  DO command
  Description
C-g keyboard-quit Abort partially typed or executing command.
C-x u n/a Undo last change. Repeat to undo more changes.
n/a revert-buffer Restore buffer to last saved version of associated file.
n/a recover-file Use journaling file to recover interrupted editing session.
C-l (el) recenter Refesh screen, center display on current cursor position.

 
 

Getting Help

Key-Sequence
  DO command
  Description
C-x 1 (one) delete-other-windows Remove the Help window.
ESC C-v scroll-other-window Scroll the Help window.
C-h a apropos-command Show commands matching string.
C-h k describe-key Show command bound to the next key(s) pressed.
C-h w where-is Show key bound to the following command name.
C-h f describe-function Display information about next command name entered.

 
 

Moving Around

Key-Sequence
  DO command
  Description
C-a beginning-of-line Move to first char on current line.
C-e end-of-line Move to last char on current line.
C-v
NEXT_SCREEN
scroll-up-command Move forward by one screen.
ESC v
PREV_SCREEN
scroll-down-command Move backward by one screen.
ESC > beginning-of-buffer Move to top of buffer.
ESC < end-of-buffer Move to end of buffer.
ESC g goto-line Prompts in mini-buffer for a line number to jump to. (ESC g bound in XEmacs only.)

 
 

Cut and Paste

Key-Sequence
  DO command
  Description
C-k kill-line Delete from cursor to end of line. If at beginning of line, eat entire line.
(none) backward-kill-line Delete from cursor to start of line. (What a VMS user wishes C-u did.)
C-space
SELECT
1
set-mark-command Begin the selection of a region of text.2   Use any command that moves the cursor to select text from the mark to cursor.
C-w
REMOVE
1
kill-region Cut region to kill ring (cut/paste buffer). Performing an undo right after a kill-region will paste text back but will not restore previous contents of kill ring.
ESC w kill-ring-save Copy region to kill ring (cut/paste buffer).
C-y
INSERT_HERE
1
yank Paste last killed text. (This could also be text removed by kill-line, etc.)
n/a3 overwrite-mode Toggle overwrite/insert mode (default is insert).

 
 

 

 

 

Search and Replace

Key-Sequence
  DO command
  Description
FIND search-forward Case insensitive 'dumb' search. Pressing key twice does not repeat previous search.
C-s isearch-forward Case 'smart' (like EVE) incremental search forward. Press RETURN to stop search.
C-s C-s n/a Repeat previous search (like hitting FIND twice when using EVE).
C-r isearch-backward Case 'smart' (like EVE) incremental search backward.
ESC $ query-replace Prompts for target and replacement string. y or SPC to replace, etc.
n/a replace-string Prompts for target and replacement string. Replaces, without verification, all occurrence from current cursor position to end of buffer.

 
 

Windows

Key-Sequence
  DO command
  Description
C-x 2 split-window-vertically Split current window into two.
C-x 3 split-window-horizontally Split window into side by side panes.
C-x o (oh) other-window Move to other window.
C-x 0 (zero) delete-window Delete current window.
C-x 1 (one) delete-other-windows Delete all windows but this one.
ESC C-v scroll-other-window Scroll other window.
C-x 4 f find-file-other-window Prompts for filename in mini-buffer. TAB key can be used for filename completion.

 
 

 

 

 

 

Tools, Shortcuts & Keyboard Macros

Key-Sequence
  DO command
  Description
n/a ispell-buffer Spell check current buffer. (Note that spell-buffer also works but calls up a more primitive spell checker.)
DO UP RET n/a Recall last command. After pressing the DO key, the up and down arrow keys may be used to scroll through previously entered commands. The sequence illustrated would be equivalent to hitting the DO key twice in EVE.
C-x ( start-kbd-macro Execute and remember the following keystrokes (like EVE 'learn' command).
C-x ) end-kbd-macro Finish defining the keyboard macro.
C-x e call-last-kbd-macro Execute last defined keyboard macro.
n/a name-last-kbd-macro Prompts for name. Whatever name you assign can now be used as a DO command for current session.
n/a global-set-key Prompts for 'key' (such as an unassigned function key, hint, hint) and then the command to bind to that key. Command can be an existing Emacs command, or one defined by you using name-last-kbd-macro function above (hint, hint).

 
 
Footnotes
1 Requires the following key (re)definitions to be placed in your .emacs file:
                                                ;== VT200 Editing keypad ==
(global-set-key [insert] 'yank)                 ; [INSERT HERE]
(global-set-key [delete] 'kill-region)          ; [REMOVE]
(global-set-key [select] 'set-mark-command)     ; [SELECT]
While this makes Emacs cut and paste functionality feel similar to EVE, beware that Emacs' behavior can be more complex in this area, thus surprising results may sometimes occur. Should this ever happen to you, don't panic! Just remember to use the undo command and try again.
2 In GNU Emacs, the selected text is not highlighted as in EVE. When setting the mark, watch for the message Mark set in the minibuffer to confirm the mark has been set, then move the cursor to select text as you would in EVE.
3 The default is for the INSERT_HERE key to be mapped to this function, but this is replaced by the redefinition of that key shown in the footnote above.
=r8ϣ@ČhQp[+cjKnooGEhHDool& XY- D" oޜ|}N#<%4NM۫Ww%n鬓$|jG ZoXW G#J9әƝ3Wk[0M <=;=4xǔF#(?>f/htVLdyJ:ft|צ6OA=Oѡi RzO;CM /`Qr!0ܥk[X7YQ4"Q1(fз6a B 4 _}xv|jy`Ӌ?K_^l `jXiDDK 6`x`6uNф.&΄NC3S0ElY1O?He5|Պ:ÛC w#DF.L0]P'M}7X5HLmNY,qwj:Gh~×(W+1CŲV ki'*sCa@~dǢxg~YHyV̄*xX%A[갱9k I1VU}d VBP ZEu,)fC=aG߾\I>2 f䚍ZeEs@ϒ,(Na1s2 ىBغHH"g>Px\RrȥEgE^̥=Xa^@L{ ̕H6բܳ,nXs AKL0}`ۋ44XthE}{k@дmgәW$hԛ)>ߜ7A+Jsd$Ai @2D@\R ǔѣi;PΖ>#ٷEC;;'n7ONm+ڟ>}9 V!J LX@$pM~)g[4E8˥>(~޸#I/71eUe^˳ Q%:K+ Ϊ)1N%_%&k@숚*b"c] 4cRH:R;(!L$01HZ6% sb:|b rd:p{G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