emacs cheat sheet, by Thomas Krichel


There is an old emacs reference card for emacs. For the curious, here is the plain TeX source code but is quite out of date. Here I have composed a new version, but it's on the web.

frequent commmands

getting out

leave emacs
escapes out of prompts in emacs
suspend emacs, "fg" gets you back to emacs

basic cursor commands, also effective in the shell

go to the beginning of the line
go to the end of the line
kill to the end of the line
yank (bring back what was killed

basic cursor commands, also effective in the shell

^x i
instert file
^x f
load file into a new buffer

from my .emacs

; for utf-8
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(global-set-key "\C-u" 'ucs-insert)

; bind META-G to go to a certain line
(global-set-key "\M-g" 'goto-line)

; preserve old fashioned line style, where arrows move down a line
; in the file, rather than a displayed line
(setq line-move-visual nil)

;; now comes less useful settings

; show the time

; no visible bell?
(setq visible-bell t)

; Load nxml-mode for files ending in .xml, .xsl, .rng, .xhtml
(setq auto-mode-alist
(cons '("\\.\\(xml\\|xsl\\|rng\\|html\\)\\'" . nxml-mode)

; dns mode for all files ending .db
(setq auto-mode-alist
(cons '("\\.\\(db\\)\\'" . dns-mode)

; set up cperl mode
(lambda (pair)
(if (eq (cdr pair) 'perl-mode)
(setcdr pair 'cperl-mode)))
(append auto-mode-alist interpreter-mode-alist))
(setq cperl-invalid-face (quote off))
(add-hook 'cperl-mode-hook
'(lambda ()
(setq indent-tabs-mode nil)
(add-hook 'local-write-file-hooks 'untabify-buffer)

Valid XHTML 1.0!