A list of handy Emacs and SML REPL keyboard shortcuts:
- C-x C-cQuit Emacs
- C-gCancel the current action
- C-x C-fFind and open a file (whether or not it already exists)
- C-x C-sSave a file
- C-x C-wWrite a file (probably more familiar to you as Save as...)
- C-ego to end of line
- C-ago to begin of line
- C-spaceSet a mark and then move the cursor to highlight a region
- C-wCut a highlighted region
- M-wCopy a highlighted region
- C-kCut (kill) from the cursor to the end of the line
- C-yPaste (yank)
- C-x uUndo
- M-;line comment - region or goes to end of line
- C-u M-;removes line comment
- C-M-\indent region
- C-x bSwitch to another buffer by entering its name
- C-x C-bSee a list of all current buffers
- C-x 1Get rid of buffer list
- C-x kkill a buffer
- C-x 0Undo window-splitting so there is only 1 buffer; dismiss this split
- C-x 1Dismiss all other windows
- C-x 2Split the window horizontally into 2 buffers, one above the other
- C-x oSwitch between windows
See Manage Split Windows tutorial.
- M-pprevious command
- M-nnext command
SML mode from http://www.smlnj.org/doc/Emacs/sml-mode.html
- C-c C-sSML REPL command
- M-<TAB>Indentation
- <TAB>Indentation
- C-c C-bSend the contents of the current buffer to ML.
- C-c C-lSend a `use file' command to the current ML process.