Emacs Cheatsheet
Contents
Enriched Mode
M-o d: Set face to default; Remove all face properties from region:
- Remove all face properties from the region (which includes specified colors), or force the following inserted character to have no face property (facemenu-set-default).
M-o b: Add the face bold to the region or to the following inserted character (facemenu-set-bold).
list-faces-display: show faces
M-x find-file-literally : read & display enriched-text file as raw text
Info Mode
C-x C-h i <filename>: load (arbitrary) info file
Keyboard Macros
C-x (: start recording macro
C-x ): stop recording macro
M-x name-last-kbd-macro: give name to just-recorded macro
M-x insert-kbd-macro: insert macro definition into buffer
C-x e: Execute just-defined keyboard macro
C-u 37 C-x e: execute just-defined macro 37 times
M-x global-set-key: map key to function
Lisp
C-x C-e: eval preceding list (eval-last-sexp)
Lossage Buffer
C-h L: view lossage buffer (to see key strokes)
- handy for figuring out how keys are specified for remapping
Menu Bar
accessing that pesky menu bar without a mouse
<f10>: On windows
M-`: In general
Registers
C-x r s R: copy region into register R ('copy-to-register')
C-x r i R: insert text from register R ('insert-register')
Search and Regexp
C-R: isearch-backward
M-C-s: isearch-forward-regexp
- interactive regexp search
syntax of emacs regexp: http://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_17.html
regexp
parse.*gps matches Parseinparam_GPS
\.+[digit] matches .........2008
character classes:
http://www.gnu.org/software/emacs/elisp/html_node/Char-Classes.html#Char-Classes
example: [[:digit:]]+-[[:digit:]] matches 2008-11
Windows
C-x 3: split window vertically
C-x 0: ??
Calc
- M-x calc
- d r 16: display hex
- 16#f: input 0xF
