Emacs Cheat Sheet
- ‘C-‘ means use the CTRL key.
-
‘M-‘ means use the Meta (or Alt) key.
- C-x C-c: Exit Emacs session
- C-x k: Kill buffer
-
C-x u: Undo changes
-
C-x C-f: Find file
- C-x b: Switch buffer
- C-x 0: Delete window
- C-x 1: Delete other windows
- C-x 2: Split the current window horizontally
- C-x 3: Split the current window vertically
-
C-x 4 0: Kill buffer and window (basically it combines C-x k and C-x 0)
-
M-x RET: Execute command
- linum-mode
- global-linum-mode
- display-line-numbers-mode
-
global-display-line-numbers-mode
-
C-g: Quit a partially entered command
- C-v: View next screen (Scroll down)
- M-v: View previous screen (Scroll up)
- C-l: Center whole diagram in the screen
- C-f: Move forward a character
- C-b: Move backward a character
- C-n: Move to next line
- C-p: Move to previous line
- M-f: Move forward a word
- M-b: Move backward a word
- C-a: Move to beginning of line
- C-e: Move to end of line
- M-a: Move to beginning of sentence
- C-e: Move to end of sentence
- M-<: Move to beginning of whole text
-
M->: Move to end of whole text
- C-h: Get help
- C-h r: Emacs manual
- C-h t: Emacs tutorial
- C-h i: Browse tutorial
- C-h RET: Emacs tutorial
- C-h C-c: See the conditions
- C-h C-o: Information on getting the latest version
-
C-h C-w: Full details
-
C-h v: Browse variables
- user-init-file
-
user-emacs-directory
- M-`: Active menubar
- M-x: To recover the files you were editing if an Emacs session crashed recently
- M-!: Execute shell commands