Command | Function |
---|---|
C-g | Cancel |
C-/ | Undo |
C-x C-c | Quit |
F10 | Menu |
M-x ansi-term | Open terminal |
Command | Function |
---|---|
C-x C-f | Open file |
C-x C-s | Save file |
C-x C-w | Save as |
C-x s | Save all buffers |
Command | Function |
---|---|
C-k | Delete to end of line |
C-DEL | Delete next word |
M-BKS | Delete previous word |
M-^ | Join with previous line |
C-t | Transpose two characters |
M-t | Transpose word to right |
C-x C-t | Transpose lines1 |
C-a C-space C-n M-w C-y | Duplicate line |
M-^ | Join to previous line |
Command | Function |
---|---|
C-space | Start marking2 |
C-x h | Mark all |
C-w | Cut from mark to point |
M-w | Copy " |
C-d | Delete " |
C-y | Paste ("Yank") |
M-y | Paste older items |
C-x r t foo | Rectangular edit - type foo |
Command | Function |
---|---|
M-l | Convert following word to lower case (downcase-word) |
M-u | Convert following word to upper case (upcase-word) |
M-c | Capitalize the following word (capitalize-word) |
C-x C-l | Convert region to lower case (downcase-region) |
C-x C-u | Convert region to upper case (upcase-region) |
Command | Function |
---|---|
C-s | Search |
C-r | Search backwards |
ESC C-s | Regexp search |
ESC C-r | Regexp backwards |
M-v replace-regexp RET pattern RET replacement | Regexp replace |
Command | Function |
---|---|
ESC % RET replace RET replacement | Query replace |
Space or y | Replace |
DEL or n | Skip |
! | Replace all |
RTN or q | Quit |
Command | Function |
---|---|
C-x b | Switch to buffer (by name) |
C-x C-b | List buffers (and select) |
C-x → | Next buffer |
C-x ← | Previous buffer |
C-x 0 | Close current window |
C-x 1 | Close other windows |
C-x 2 | Split windows vertically ◒ |
C-x 3 | Split windows horizontally ◑ |
C-x o | Switch to other window |
Command | Function |
---|---|
C-v | Page down |
M-v | Page up |
M-g M-g | Goto line |
M-> | End |
M-< | Start |
C-a, C-e | Start, end of line |
C-f, C-b | Forward, backward one character |
C-n, C-p | Next, previous line |
M-f, M-b | Forward, back one word |
I.e. record and playback
Command | Function |
---|---|
C-x ( | Start recording |
C-x ) | Finish reording |
C-x e | Execute |
.. e | Execute again |
ESC n C-x e | Execute n times |
Command | Function |
---|---|
C-c ! | Python shell |
C-c C-c | Execute current buffer |
C-c C-t | insert import ipdb; ipdb.set_trace() |
Command | Function |
---|---|
C-h t | Tutorial |
C-h r | Manual |
C-h C-h | Help about help |
M-x load-theme | Load theme |
C-x * Q | Quick calc |
(Only with my ~/.emacs.d/init.el
.)
Command | Function |
---|---|
M-↑ | Move line up |
M-↓ | Move line down |
Symbol | Key |
---|---|
C | Ctrl |
M | Meta. Usually Alt, often Esc in Mac terminal apps. |