Reminder: C- indicates the Ctrl key; M- indicates the Meta key.
Keystrokes | Command name | Description |
|---|
C-f | forward-char | Move forward one character (right). |
C-b | backward-char | Move backward one character (left). |
C-p | previous-line | Move to previous line (up). |
C-n | next-line | Move to next line (down). |
M-f | forward-word | Move one word forward. |
M-b | backward-word | Move one word backward. |
C-a | beginning-of-line | Move to beginning of line. |
C-e | end-of-line | Move to end of line. |
M-a | backward-sentence | Move backward one sentence. |
M-e | forward-sentence | Move forward one sentence. |
M-{ | backward-paragraph | Move backward one paragraph. |
M-} | forward-paragraph | Move forward one paragraph. |
C-v | scroll-up | Move forward one screen. |
M-v | scroll-down | Move backward one screen. |
C-x [ | backward-page | Move backward one page. |
C-x ] | forward-page | Move forward one page. |
M-> | end-of-buffer | Move to end of file. |
M-< | beginning-of-buffer | Move to beginning of file. |
(none) | goto-line | Go to line n of file. |
(none) | goto-char | Go to character n of file. |
C-l | recenter | Redraw screen with current line in the center. |
M-n | digit-argument | Repeat the next command n times. |
C-u n | universal-argument | Repeat the next command n times. |
Keystrokes | Command name | Description |
|---|
Del | backward-delete-char | Delete previous character. |
C-d | delete-char | Delete character under cursor. |
M-Del | backward-kill-word | Delete previous word. |
M-d | kill-word | Delete the word the cursor is on. |
C-k | kill-line | Delete from cursor to end of line. |
M-k | kill-sentence | Delete sentence the cursor is on. |
C-x Del | backward-kill-sentence | Delete previous sentence. |
C-y | yank | Restore what you've deleted. |
C-w | kill-region | Delete a marked region (see next section). |
(none) | backward-kill-paragraph | Delete previous paragraph. |
(none) | kill-paragraph | Delete from the cursor to the end of the paragraph. |
Keystrokes | Command name | Description |
|---|
(none) | abbrev-mode | Enter (or exit) word abbreviation mode. |
C-x a i g | inverse-add-global-abbrev | Type global abbreviation, then definition. |
C-x a i l | inverse-add-local-abbrev | Type local abbreviation, then definition. |
(none) | unexpand-abbrev | Undo the last word abbreviation. |
(none) | write-abbrev-file | Write the word abbreviation file. |
(none) | edit-abbrevs | Edit the word abbreviations. |
(none) | list-abbrevs | View the word abbreviations. |
(none) | kill-all-abbrevs | Kill abbreviations for this session. |
Keystrokes | Command name | Description |
|---|
C-x 2 | split-window-vertically | Divide the current window into two, one on top of the other. |
C-x 3 | split-window-horizontally | Divide the current window into two, side by side. |
C-x > | scroll-right | Scroll the window right. |
C-x < | scroll-left | Scroll the window left. |
C-x o | other-window | Move to the other window. |
C-x 0 | delete-window | Delete current window. |
C-x 1 | delete-other-windows | Delete all windows but this one. |
(none) | delete-windows-on | Delete all windows on a given buffer. |
C-x ^ | enlarge-window | Make window taller. |
(none) | shrink-window | Make window shorter. |
C-x } | enlarge-window-horizontally | Make window wider. |
C-x { | shrink-window-horizontally | Make window narrower. |
C-M-v | scroll-other-window | Scroll other window. |
C-x 4 f | find-file-other-window | Find a file in the other window. |
C-x 4 b | switch-to-buffer-other-window | Select a buffer in the other window. |
C-x 5 f | find-file-other-frame | Find a file in a new frame. |
C-x 5 b | switch-to-buffer-other-frame | Select a buffer in another frame. |
(none) | compare-windows | Compare two buffers; show first difference. |
Keystrokes | Command name | Description |
|---|
C-x . | set-fill-prefix | Use characters from the beginning of the line up to the cursor column as the "fill prefix." This prefix is prepended to each line in the paragraph. Cancel the prefix by typing this command in column 1. |
(none) | indented-text-mode | Major mode: each tab defines a new indent for subsequent lines. |
(none) | text-mode | Exit indented text mode; return to text mode. |
C-M-\ | indent-region | Indent a region to match first line in region. |
M-m | back-to-indentation | Move cursor to first character on line. |
C-M-o | split-line | Split line at cursor; indent to column of cursor. |
(none) | fill-individual-paragraphs | Reformat indented paragraphs, keeping indentation. |
Keystrokes | Command name | Description |
|---|
C-x ( | start-kbd-macro | Start macro definition. |
C-x ) | end-kbd-macro | End macro definition. |
C-x e | call-last-kbd-macro | Execute last macro defined. |
M-n C-x e | digit-argument and call-last-kbd-macro | Execute last macro defined n times. |
C-u C-x ( | universal-argument and start-kbd-macro | Execute last macro defined, then add keystrokes. |
(none) | name-last-kbd-macro | Name last macro you created (before saving it). |
(none) | insert-keyboard-macro | Insert the macro you named into a file. |
(none) | load-file | Load macro files you've saved and loaded. |
(none) | macroname | Execute a keyboard macro you've saved. |
C-x q | kbd-macro-query | Insert a query in a macro definition. |
C-u C-x q | (none) | Insert a recursive edit in a macro definition. |
C-M-c | exit-recursive-edit | Exit a recursive edit. |
Keystrokes | Command name | Description |
|---|
C-h a | command-apropos | What commands involve this concept? |
(none) | apropos | What functions and variables involve this concept? |
C-h c | describe-key-briefly | What command does this keystroke sequence run? |
C-h b | describe-bindings | What are all the key bindings for this buffer? |
C-h k | describe-key | What command does this keystroke sequence run, and what does it do? |
C-h l | view-lossage | What are the last 100 characters I typed? |
C-h w | where-is | What is the key binding for this command? |
C-h f | describe-function | What does this function do? |
C-h v | describe-variable | What does this variable mean, and what is its value? |
C-h m | describe-mode | Tell me about the mode the current buffer is in. |
C-h s | describe-syntax | What is the syntax table for this buffer? |