Meta-< goes to beginning of buffer. (Previous Screen) Meta-V Rubout or Delete : Control-D <-------------------- : ---------------------> (Deletes Backward) : (Deletes Forward) (Previous Line) Control-P : : Control-A ........ Control-B .... Cursor .... Control-F ........ Control-E (Head of Line) (Move Backward) : (Move Forward) (End of Line) : Control-N (Next Line) ---------> : Control-T : Control-K <--------- : =====================> (Transpose Characters) : (Kills to end of line) : Control-V (Next Screen) Meta-> goes to end of buffer. Emacs commands try to be very regular. There are Meta- commands similar to these Control- commands which work on words in much the same way as these commands work on characters. Control-Meta- commands work in similar ways on Lisp S-Expressions. Watch for and make use of these trends. They can really reduce the number of things you have to remember. --------------------------- Useful Sub-Topics ------------------------------ *** HELP *** The magic [Help] character is Top-H (or on Ascii keyboards: Control-_ H). It will offer help of various sorts almost anywhere at any time. In most places, it will offer you a menu of several possible kinds of documentation, where you must type another character to get the desired kind of help. At such times, the following are especially useful: [Help] C will read another character and describe its action. You should use this to describe any commands you read about in this document which you would like to understand in full detail. The info given here is intended only as an index and is not complete. [Help] ? will give you a description of the several other very useful options available through the [Help] facility. *** QUIT *** Control-G aborts all currently executing operations, flushes typeahead, and leaves you at the innermost invocation of ^R-mode. Control-] aborts a recursive ^R-mode (such as RMail Reply -- exits without sending any mail). Emacs Command Index Page 2 Useful META- Commands (On an ascii keyboard, Meta- is Altmode ) Meta-[ goes to Beginning of Paragraph Control-X Rubout <=========================== (Delete Sentence Backward) Meta-Rubout or Meta-Delete Meta-D <--------------------------- ---------------------> (Deletes Word Backward) (Deletes Word Forward) Meta-A ........ Meta-B .... Cursor .... Meta-F ........ Meta-E (Head of Sentence) (Back Word) (Forward Word) (End of Sentence) ---------> Meta-T Meta-K <--------- <====================> (Transpose Words) (Kills Current sentence) Meta-] goes to End of Paragraph ------------------------------------------------------------------------------ Useful CONTROL-META- Commands (On an ascii keyboard, C-M- is Control-C ) C-M-[ goes to Beginning of Defun C-M-Rubout or C-M-Delete C-M-K <---------------------- ---------------------> (Deletes S-Expression Backward) (Deletes S-Expression Forward) (Backward Up List) C-M-U : (Backward List) C-M-P : C-M-A ............. C-M-B ....... Cursor ....... C-M-F .......... C-M-E (Beginning of S-Exp) (Back S-Exp) : (Forward S-Exp) (End of S-Exp) C-M-N (Forward List) ---------> : C-M-T C-M-D <--------- (Forward Down List) (Transpose S-Expressions) C-M-] goes to End of Defun Emacs Command Index Page 3 *** EXTENDED COMMANDS *** Meta-X runs the extended command set completing reader (MM Commands). *** SPECIAL PREFIX CHARACTERS *** Control-X (Dispatch Character) reads exactly one more character. What that character is will decide what command is run. These commands, called the 'Control-X commands' can be documented by typing Control-X ? Control-U (Argument Prefix) is the 'Universal' argument prefix. Control-U digit digit ... digit non-digit-command will accumulate the digits as a numerical argument to the next command. For example, Control-U 1 2 3 Control-B moves backward 123 characters. If not followed by digits, Control-U will multiply the arg to the next command by 4. eg, Control-U Control-B will move backward 4 characters - note that Control-U Control-U Control-B will move backward 16 characters. *** PREFIX CHARACTERS FOR ASCII TERMINALS (Non-TV's) *** Control-^ - Prefix Control Altmode - Prefix Meta Control-C - Prefix Control-Meta Control-\ - Prefix Meta These commands read the next character and adjust it appropriately. For example, Control-C C is equivalent to Control-Meta-C and Altmode C is equivalent to Meta-C. *** QUOTE *** Control-Q is the EMACS quote character. The next character typed after it will be inserted literally into the buffer rather than having its normal effect. ------------------------------------------------------------------------------ Disclaimer: This documentation lies about one thing. There is a difference between Control-H and Backspace, Control-I and Tab, Control-J and Linefeed, etc. but most of these pairs of keys do identical things and the distinction would not be interesting to most people, so for simplicity they are treated as synonymous here when in fact they are not. Sophisticated users should see other documentation for more details. Emacs Command Index Page 4 ****************************************************************************** * Cursor Control * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ H : Backspace or : Backward Character : Control-H : ------------------------------------------------------------------------------ : Control-A : Beginning of Line :----------------:------------------------------------------------- A : Meta-A : Beginning of Sentence :----------------:------------------------------------------------- : Control-Meta-A : Beginning of Defun ------------------------------------------------------------------------------ : Control-B : Backward Character :----------------:------------------------------------------------- B : Meta-B : Backward Word :----------------:------------------------------------------------- : Control-Meta-B : Backward S-Expression ------------------------------------------------------------------------------ D : Control-Meta-D : Down List ------------------------------------------------------------------------------ : Control-E : End of Line :----------------:------------------------------------------------- E : Meta-E : End of Sentence :----------------:------------------------------------------------- : Control-Meta-E : End of Defun ------------------------------------------------------------------------------ : Control-F : Forward Character :----------------:------------------------------------------------- F : Meta-F : Forward Word :----------------:------------------------------------------------- : Control-Meta-F : Foward S-Expression ------------------------------------------------------------------------------ : Meta-M : Move to beginning of text on current line M :----------------:------------------------------------------------- : Control-Meta-M : Move to beginning of text on current line ------------------------------------------------------------------------------ : Meta-[ : Move to beginning of paragraph :----------------:------------------------------------------------- [ : Control-Meta-[ : Move to beginning of defun :----------------:------------------------------------------------- : Control-X [ : Move to beginning of page ------------------------------------------------------------------------------ : Meta-] : Move to beginning of paragraph :----------------:------------------------------------------------- ] : Control-Meta-] : Move to beginning of DEFUN :----------------:------------------------------------------------- : Control-X ] : Move to beginning of page ------------------------------------------------------------------------------ Emacs Command Index Page 5 ****************************************************************************** * CURSOR CONTROL (cont'd) * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-N : Move to Next Line :----------------:------------------------------------------------- N : Meta-N : Move to Next Comment Line :----------------:------------------------------------------------- : Control-Meta-N : Move across Next List ------------------------------------------------------------------------------ : Control-P : Move to Previous Line :----------------:------------------------------------------------- P : Meta-P : Move to Previous Comment Line :----------------:------------------------------------------------- : Control-Meta-P : Move across Previous List ------------------------------------------------------------------------------ U : Control-Meta-U : Up List ------------------------------------------------------------------------------ : Control-V : View Next Page V :----------------:------------------------------------------------- : Meta-V : View Previous Page ------------------------------------------------------------------------------ X : Control-X ^X : Exchange point (cursor position) and mark ------------------------------------------------------------------------------ ****************************************************************************** * DISPLAY * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ L : Form or : Clears screen and redisplays : Control-L : ------------------------------------------------------------------------------ : Meta-R : Move cursor relative to screen position R :----------------:------------------------------------------------- : Control-Meta-R : Reposition window ------------------------------------------------------------------------------ Emacs Command Index Page 6 ****************************************************************************** * SEARCHING * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ R : Control-R : Reverse Search ------------------------------------------------------------------------------ S : Control-S : Search (forward) ------------------------------------------------------------------------------ ****************************************************************************** * MOVING TEXT * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-T : Transpose Characters :----------------:------------------------------------------------- T : Meta-T : Transpose Words :----------------:------------------------------------------------- : Control-Meta-T : Transpose S-Expressions :----------------:------------------------------------------------- : Control-X ^T : Transpose Lines :------------------------------------------------------------------ : Control-X T : Transpose Regions ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ****************************************************************************** * PREFIX CHARACTERS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ Altmode : Altmode : Meta-Prefix Character : : (doesn't do this in a mini-buffer) ------------------------------------------------------------------------------ \ : Control-\ : Meta-Prefix Character : : (good for use in mini-buffer) ------------------------------------------------------------------------------ C : Control-C : Control-Meta Prefix Character ------------------------------------------------------------------------------ Q : Control-Q : Quote Prefix (Inserts next character typed) ------------------------------------------------------------------------------ U : Control-U : 'Universal' Argument Prefix ------------------------------------------------------------------------------ X : Control-X : Control-X Command Prefix ------------------------------------------------------------------------------ Emacs Command Index Page 7 ****************************************************************************** * READING AND WRITING FILES * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ F : Control-X ^F : Find File ------------------------------------------------------------------------------ Q : Control-X ^Q : Inhibit Auto-Writeback ------------------------------------------------------------------------------ R : Control-X ^R : Read File ------------------------------------------------------------------------------ S : Control-X ^S : Save File (under default filename) ------------------------------------------------------------------------------ V : Control-X ^V : Visit File ------------------------------------------------------------------------------ W : Control-X ^W : Write File (reads a filename) ------------------------------------------------------------------------------ ****************************************************************************** * BUFFER MANIPULATION * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ A : Control-X A : Append to Buffer ------------------------------------------------------------------------------ : Control-X B : Select Buffer B :----------------:------------------------------------------------- : Control-X ^B : List Buffers ------------------------------------------------------------------------------ K : Control-X K : Kill Buffer ------------------------------------------------------------------------------ Emacs Command Index Page 8 ****************************************************************************** * INDENTATION * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Tab or : : Control-I : Indent According to Mode :----------------:------------------------------------------------- I : Meta-I : Indent to Tab Stop :----------------:------------------------------------------------- : Control-Meta-I : Indent for Lisp :----------------:------------------------------------------------- : ^X Tab : Indent Rigidly ------------------------------------------------------------------------------ J : Linefeed or : : Control-J : Indent New Line ------------------------------------------------------------------------------ Q : Control-Meta-Q : Indent All Lines in Next S-Expression ------------------------------------------------------------------------------ ; : Meta-; : Indent for Comment ------------------------------------------------------------------------------ ****************************************************************************** * BLANK LINES AND CARRIAGE RETURNS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-M : Insert a Carriage-Return (TV's only) M :----------------:------------------------------------------------- : Return : Insert a Carriage-Return + Linefeed (CRLF) ------------------------------------------------------------------------------ : Control-O : Open a Blank Line (insert a CRLF after cursor) :----------------:------------------------------------------------- O : Control-Meta-O : Open a Blank Line; move text vertically down :----------------:------------------------------------------------- : Control-X ^O : Kill Blank Lines around this line's end ------------------------------------------------------------------------------ Emacs Command Index Page 9 ****************************************************************************** * MARKING A REGION * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Meta-H : Mark Paragraph :----------------:------------------------------------------------- H : Control-Meta-H : Mark S-Expression :----------------:------------------------------------------------- : Control-X H : Mark Whole Buffer ------------------------------------------------------------------------------ P : Control-X ^P : Mark Page ------------------------------------------------------------------------------ ****************************************************************************** * TEXT DELETION * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Rubout : Delete character backward :----------------:------------------------------------------------- : Meta-Rubout : Delete word backward Rubout :----------------:------------------------------------------------- or : Control-Meta- : Delete s-expression backward Delete : Rubout : :----------------:------------------------------------------------- : Control-X : Delete sentence backward : Rubout : ------------------------------------------------------------------------------ : Control-D : Delete character forward D :----------------:------------------------------------------------- : Meta-D : Delete word forward ------------------------------------------------------------------------------ : Control-K : Kill Line Forward :----------------:------------------------------------------------- K : Meta-K : Kill Sentence Forward :----------------:------------------------------------------------- : Control-Meta-K : Kill S-Expression Forward ------------------------------------------------------------------------------ W : Control-W : Kill Region ------------------------------------------------------------------------------ ; : Control-Meta-; : Kill Comment ------------------------------------------------------------------------------ Emacs Command Index Page 10 ****************************************************************************** * TEXT COPYING * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ A : Control-X A : Append Region to a Specified Buffer ------------------------------------------------------------------------------ : Meta-W : Copy Region W :----------------:------------------------------------------------- : Control-Meta-W : Make next kill join previous in kill buffer ------------------------------------------------------------------------------ ****************************************************************************** * RESTORING DELETED/COPIED TEXT * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-Y : Yank last item from kill buffer into buffer. :----------------:------------------------------------------------- Y : Meta-Y : Yank 'the kill before that' (only after ^Y) :----------------:------------------------------------------------- : Control-Meta-Y : Mini-buffer only: Yank last mini-buffer : : command string. : : RMAIL Reply only: Yank text of message. : : (Not defined anywhere else) ------------------------------------------------------------------------------- ****************************************************************************** * COMMENT FIELDS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Meta-J : Indent New Comment Line J :----------------:------------------------------------------------- : Control-Meta-J : Indent New Comment Line ------------------------------------------------------------------------------ N : Meta-N : Move to Next Comment Line ------------------------------------------------------------------------------ P : Meta-P : Move to Previous Comment Line ------------------------------------------------------------------------------ : Meta-; : Indent for Comment :----------------:------------------------------------------------- ; : Control-Meta-; : Kill Comment :----------------:------------------------------------------------- : Control-X ; : Set Comment Column ------------------------------------------------------------------------------ Emacs Command Index Page 11 ****************************************************************************** * SUBSYSTEMS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ D : Control-X D : DIRED (a Directory Editor) ------------------------------------------------------------------------------ I : Control-X I : INFO (like :INFO at DDT) ------------------------------------------------------------------------------ M : Control-X M : MAIL (send MAIL to other users) ------------------------------------------------------------------------------ R : Control-X R : RMAIL (like :RMAIL at DDT) ------------------------------------------------------------------------------ ****************************************************************************** * TECO RELATED COMMANDS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ G : Control-X G : Get from Q-Register ------------------------------------------------------------------------------- X : Control-X X : Put in Q-Register ------------------------------------------------------------------------------- ****************************************************************************** * EXTENDED COMMANDS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Meta-X : Extended Command X :----------------:------------------------------------------------- : Control-Meta-X : Extended Command, reading its own arguments ------------------------------------------------------------------------------ Emacs Command Index Page 12 ****************************************************************************** * QUIT/EXIT COMMANDS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-Meta-C : Exit recursive edit C :----------------:------------------------------------------------- : Control-X ^C : Exit Job Temporarily - Return to Superior ------------------------------------------------------------------------------ G : Control-G : Abort currently executing command ------------------------------------------------------------------------------ ] : Control-] : Abort a recursive ^R-mode : : (eg, flush RMAIL Reply without sending mail) ------------------------------------------------------------------------------ Z : Control-Z : Exit Job Temporarily - Return to superior ------------------------------------------------------------------------------ ****************************************************************************** * SETTING COLUMN VARIABLES * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ F : Control-X F : Set Fill Column ------------------------------------------------------------------------------ N : Control-X ^N : Set goal column (for ^N and ^P commands) ------------------------------------------------------------------------------ ****************************************************************************** * DIRECTORY HACKING COMMANDS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Control-X D : DIRED (a Directory Editor) D :----------------:------------------------------------------------- : Control-X ^D : Directory Listing (of files related to buffer) ------------------------------------------------------------------------------ Emacs Command Index Page 13 ****************************************************************************** * CASIFYING * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ C : Meta-C : Capitalize Word ------------------------------------------------------------------------------ : Meta-L : Lowercasify word L :----------------:------------------------------------------------- : Control-X ^L : Lowercasify Region ------------------------------------------------------------------------------ : Meta-U : Uppercasify word U :----------------:------------------------------------------------- : Control-X ^U : Uppercasify region ------------------------------------------------------------------------------ ****************************************************************************** * FORMATTING TEXT * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ : Meta-G : Fill Text Region G :----------------:------------------------------------------------- : Control-Meta-G : Grind Lisp or Macsyma code ------------------------------------------------------------------------------ Q : Meta-Q : Fill paragraph ------------------------------------------------------------------------------ S : Meta-S : Center text on line ------------------------------------------------------------------------------ ****************************************************************************** * INFORMATION ABOUT BUFFERED TEXT * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ L : Control-X L : Count Lines on Current Page ------------------------------------------------------------------------------ = : Control-X = : Info about Screen and Buffer Position ------------------------------------------------------------------------------ Emacs Command Index Page 14 ****************************************************************************** * COMMANDS FOR DEALING WITH 2 WINDOWS * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ 1 : Control-X 1 : Return to 1-window mode ------------------------------------------------------------------------------ 2 : Control-X 2 : Enter 2-window mode (use other window) ------------------------------------------------------------------------------ 3 : Control-X 3 : Enter 2-window mode (use same window) ------------------------------------------------------------------------------ 4 : Control-X 4 : Enter 2-window mode with fancy options ------------------------------------------------------------------------------ O : Control-X O : Move to Other Window ------------------------------------------------------------------------------ V : Control-Meta-V : View Next Page of other window ------------------------------------------------------------------------------ ^ : Control-X ^ : Grow Window ------------------------------------------------------------------------------ ****************************************************************************** * CHANGING VIRTUAL BUFFER BOUNDARIES * ****************************************************************************** ------------------------------------------------------------------------------ : : Character : Control-Bits : Meaning : : ------------------------------------------------------------------------------ N : Control-X N : Narrow Buffer Bounds (to size of region) ------------------------------------------------------------------------------- P : Control-X P : Narrow Buffer Bounds (to current page) ------------------------------------------------------------------------------ W : Control-X W : Widen buffer boundaries (to whole buffer) ------------------------------------------------------------------------------