Configuration

In the ~/.emacs file

How to make emacs stop creating “backup~” files or “#autosave#” files?

(setq make-backup-files nil) ; stop creating backup~ files
(setq auto-save-default nil) ; stop creating #autosave# files

Moving

C^a = start of the line
C^e = end of the line
M^f = next word
M^b = prev word
C^v = page down
M^v = page up
M^< = start of this buffer
M^> = en of this buffer
M^g = goto line

Copy / past / undo

C^x u = undo
C^g = quit command mode
M^suppr = delete word
C^k = kill line
C^x h = select all
C^space = start selection
C^w = cut
M^w = copy
C^y = past THEN M^y = past previous copied line

Files

C^x C^f = search file
C^x C^s = save
C^x C^w = write file
C^x C^c = quit
M^x COMMAND = Start emacs command COMMAND

Search

C^s = search
C^r = reverse search
M^% = replace

Buffers

C^x 2 2 vertical split buffers
C^x 3 2 horizontal split buffers
C^x 0 remove active buffer
C^x 1 remove non active buffers
C^x o buffer change (next)
M^x desktop-save save the session

Extra commands

M^x COMMAND NAME
find-dired = file listing with pattern
ibuffer = list file/buffers ready for batch action
follow-mode = buffer are following each other
=> Q = query multi-replace
=> *u = select modified buffers
=> S = save selected buffers
=> D = close selected buffers

Interesting commands
indent-region
js2-mode
whitespace-mode
replace-regex
revert-buffer

Remove ^M (from Windows)

M-x replace-string RET C-q C-m RET RET where “RET” means and C-q and C-m mean <hold the CTRL key and press the m (or q) key>.