Cheatography
https://cheatography.com
Doom Emacs commands cheat sheet
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Key References
Emacs |
Windows |
Mac |
M (meta) |
Alt |
Option |
C (control) |
Ctrl |
Ctrl |
s (special) |
Windows key |
Command |
S |
Shift |
Shift |
Meta
Quick menu |
SPC |
Command help |
SPC ? |
Open program |
Space : app-name |
External Command |
: ! <external command> ENTER |
Quit menu |
SPC q |
External commands like ls, pwd, rm
Help
Main menu |
SPC |
Help menu |
SPC h |
Installed docs |
SPC h i |
Describe key |
SPC h k |
Doom docs |
SPC h d h |
Search |
K |
Buffers
Menu |
SPC shift |
Buffer menu |
SPC b |
Show buffers |
SPC b i |
Show buffers with preview |
SPC b B |
Buffers can be files, directories, terminals, etc.
Windows
Window menu |
SPC w |
Split vertical (right) |
SPC w v |
Split horizontal |
SPC w s |
Switch windows |
SPC w w |
Close current window, frame, quit Emacs if last frame |
SPC w q |
File
|
Doom |
Emacs |
Home |
|
~/ |
File menu |
SPC f |
Find file |
SPC . (SPC f f) |
C-x C-f |
Save file or buffer |
SPC f s |
C-x C-s |
Save file as |
SPC f S |
C-x C-w |
Config files |
SPC f p |
Undo |
u |
C-x C-u |
Save section to file |
:#,# w FILENAME |
Merge file |
:r FILENAME |
#,# are the line numbers.
|
|
Navigation
Quit |
ESC |
Back (left) |
h |
Forward (right) |
l |
Previous (up) |
k |
Next (down) |
j |
End of line |
$ |
Line number |
:100 ENTER |
Beginning of buffer |
gg |
End of buffer |
G |
Fold heading |
Tab |
Fold all headings |
Shift + Tab |
Open link |
SPC a SPC, SPC a b |
Open link EWW |
SPC a e |
Copy and paste
Visual mode |
v |
Select to end of line |
Shift - v |
Select to end of word |
e |
Copy text (yank) |
y |
Paste text |
p |
Editing
|
Vim |
Emacs |
Insert mode |
i |
Normal mode |
ESC, jkjkjk |
C-g |
Delete character |
x |
Delete word including space |
dw |
Delete to end of line |
d$ |
Delete whole line |
dd |
Delete 2 lines |
2dd |
Put last deletion |
p |
Undo |
u |
Redo |
Ctrl+r |
Replace |
r, then character to replace |
Replace to end of line |
R |
Change Word |
cw, then the rest of the word to replace |
Change to end of line |
c$ |
Insert (open) line below |
o |
insert (open) line above |
O |
Append after char |
a |
Append to end of line |
A |
Document Formatting
|
Org |
Markdown |
Heading |
* Heading |
# Heading |
Subheading |
** Subheading |
## Subheading |
Bold |
bold |
Bold |
Italic |
/italic/ |
_Itlaics_ |
Underlined |
_underlined_ |
Strikethrough |
+strikethrough+ |
strikethrough
|
Monospace |
=monospace= |
Unordered List |
- list item |
Sublist |
- sublist item |
Ordered List |
1. |
Todo |
- [ ] |
Done |
- [X] |
Code |
|
|
Code Block |
|
|
Link |
[[LINK][DESCRIPTION]] |
|
Document Search & Replace
Search forward |
/ search term ENTER |
Search backward |
? search term ENTER |
Next search result |
n |
Previous search result |
N |
Matching (, [, or { |
% while over the first |
Replace first occurrence on line |
:s/old/new ENTER |
Replace all occurrences on line |
:s/old/new/g |
Replace occurrences on two lines |
:#,#s/old/new/g (#,# are the numbers of the lines) |
Replace occurrences globally |
:%s/old/new/g |
|