Emacs Quick Reference

This quick reference assumes that you are using the Emacs provided for the course. Emacs may behave differently for some of these key bindings if you have setup Emacs yourself.  By convention, holding down the CTRL key and x together is represented as C-x.  Likewise, pressing the ESC key and then x is represented as M-x (you can also press the ALT key together with x).


C-x C-c Quit Emacs
C-g Quit Current Command
M-x Run an Emacs Command

File Operations

C-x C-f Open/Create File
C-x k Close File
C-x C-s Save File


C-x u Undo
Shift-Del Cut
Ctrl-Ins Copy
Shift-Ins Paste
C-s Interactive Search
TAB Indent Current Line
C-M-\ Indent Selection


C-x b Switch Buffers
C-x C-b Get a List of Buffers
C-x o Switch to Other Window
C-x 1 Close Other Window
C-x 2 Split the Screen Horizontally

SML Process

M-x sml Start SML interpreter
C-c C-s Switch to SML interpreter
C-c C-l Load a file into SML interpreter
C-c C-r Send current selection to SML interpreter
C-c C-b Send current buffer to SML interpreter
C-c ` Browse through source file for next error
C-c C-d Tell the interactive session to terminate