Keystrokes | Command name | Action |
---|---|---|
C-x C-fFile Open File | find-file | Find file and read it in a new buffer. |
C-x C-v | find-alternate-file | Read an alternate file, replacing the one read with C-x C-f. |
C-x iFile Insert File | insert-file | Insert file at cursor position. |
C-x C-s File Save (current buffer) | save-buffer | Save file. |
C-x C-w File Save Buffer As | write-file | Write buffer contents to file. |
C-x C-c File Exit Emacs | save-buffers-kill-emacs | Exit Emacs. |
Keystrokes | Command name | Action |
---|---|---|
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-e | forward-sentence | Move forward one sentence. |
M-a | backward-sentence | Move backward one sentence. |
C-v | scroll-up | Move forward one screen. |
M-v | scroll-down | Move backward one screen. |
M-< | beginning-of-buffer | Move to beginning of file. |
M-> | end-of-buffer | Move to end of file. |
(none) | goto-line | Go to line n of file. |
(none) | goto-char | Go to character n of file. |
M-n | digit-argument | Repeat the next command n times. |
C-u n | universal-argument | Repeat the next command n times (four times if you omit n). |
Keystrokes | Command name | Action |
---|---|---|
C-d | delete-char | Delete character under cursor. |
Del | delete-backward-char | Delete previous character. |
M-d | kill-word | Delete next word. |
M-Del | backward-kill-word | Delete previous word. |
C-yEdit Paste Most Recent | yank | Restore what you've deleted. |
C-w Edit Cut | kill-region | Delete a marked region (see next section). |
C-@ or C- Space | set-mark-command | Mark the beginning (or end) of a region. |
C-x C-x | exchange-point-and-mark | Exchange location of cursor and mark. |
C-w | kill-region | Delete the region. |
C-y | yank | Paste most recently killed or copied text. |
M-w | kill-ring-save | Copy the region (so it can be pasted with C-y). |
C-x h | mark-whole-buffer | Mark buffer. |
M-y | yank-pop | After C-y, pastes earlier deletion. |
(none) | clipboard-kill-region | Cut region and place both in kill ring and on system clipboard. |
(none) | clipboard-yank | Paste text from clipboard. |
(none) | clipboard-kill-ring-save | Copy text to clipboard. |
Keystrokes | Command name | Action |
---|---|---|
(none) Options Word Wrap in Text Modes | auto-fill-mode | Toggle auto-fill mode, in which Emacs formats paragraphs as you type them. |
M-q | fill-paragraph | Reformat paragraph. |
(none) Edit Fill | fill-region | Reformat individual paragraphs within a region. |
Keystrokes | Command name | Action |
---|---|---|
C-g | keyboard-quit | Abort current command. |
C-x u | advertised-undo | Undo last edit (can be done repeatedly). |
C-_ Edit Undo | undo | Undo last edit. |
(none) | revert-buffer | Restore buffer to the state it was in when the file was last saved (or auto-saved). |
Keystrokes | Command name | Action |
---|---|---|
C-s Edit Search Incremental Search Forward String | isearch-forward | Start incremental search forward; follow by search string. Also, find next occurrence (forward) of search string. |
C-r Edit Search Incremental Search Backward String | isearch-backward | Start incremental search backward; follow by search string. Also, find next occurrence (backward) of search string. |