Skip to content

Instantly share code, notes, and snippets.

@hlissner
Created August 31, 2026 02:21
Show Gist options
  • Select an option

  • Save hlissner/c91b76932cbe16d6619da1a2dedf3fbd to your computer and use it in GitHub Desktop.

Select an option

Save hlissner/c91b76932cbe16d6619da1a2dedf3fbd to your computer and use it in GitHub Desktop.
Doom Emacs: cheatsheets

< back to index

Important

This gist is temporary until the new documentation (docs.doomemacs.org) and community wiki (wiki.doomemacs.org) have been published.

Dired keybind cheatsheet

This is a reference sheet for our favorite dired commands and keybinds. Here some other prominent cheat sheets:


Tip

If the vanilla key is omitted, it's because it's the same as the evil key.

Entering dired

Evil Key Vanilla Key Description
SPCfd C-cfd Open directory in dired (prompts you)
SPCo- C-co- Open current directory in dired
SPCp. + RET C-cpD Open project root in dired

Leaving dired

Key Description
q Kill all dired buffers

File IO

Evil Key Vanilla Key Description
D Delete the file at point
R Rename the file at point
C Copy the file at point
+ Create a directory
SPC. C-xC-f Create a new file
= Diff files
Z Compress a file/directory

File listing

Evil Key Vanilla Key Description
gr g Refresh the dired buffer
) dired-git-info-mode
SPCmh C-clh Toggle hidden files

Navigation

Evil Key Vanilla Key Description
RET Visit the file/directory
gO o Visit file/directory in other window
- ^ Go up one directory

Marking files

Key Description
m Mark files
%m Mark files by regexp
! Run shell command on marked files
d Mark file(s) for deletion
x Delete marked files
u Unmark a file/directory
U Unmark all marked files/directories

Renaming files/directories in bulk

  1. C-cC-e to activate wgrep (a writable grep buffer).
  2. Make your modifications (or deletions) to the file paths like you're editing plain text.
  3. Commit your changes with C-cC-c or abort with C-cC-k

< back to index

Important

This gist is temporary until the new documentation (docs.doomemacs.org) and community wiki (wiki.doomemacs.org) have been published.

Doom keybind cheatsheet

This cheat sheet serves as a reference for some of Doom's most common/helpful commands.

Tip

The Emacs notation for modifiers are:

  • M-: Meta (i.e. alt or option)
  • s-: Super (i.e. command or windows key)
  • S-: Shift
  • C-: Ctrl

For evil users

Tip

This list is not exhaustive. To look up what keys are available to you check out:

  • SPChk followed by a key sequence to look up documentation on any command bound to it.
  • SPChbb to search keybinds available in the current context.

Tip

See "What are <leader> and <localleader> keys?" to understand where the SPC prefix come from.

Leaving Emacs

Key Description
:qa Quit Emacs
:wqa Save all buffers and quit Emacs
SPCqq Quit Emacs
SPCqr Restart Emacs and restore session

Finding/saving files

Key Description
SPCSPC or SPCpf Jump to file in project (like Atom/Sublime Text's goto-anywhere)
SPC. or SPCff Explore files in current directory
SPCfS-f Jump to file under current directory (recursive)
SPCfs Save file
SPCfS-s Save file as (prompts for location)

Buffer management

Key Description
SPC, or SPCbb Switch to another buffer
SPC< or SPCbS-b Switch to another buffer across workspaces

Search (and Replace)

Key Description
SPC/ or SPCsp Search across current project
SPCsS-p Search another project (prompts you to select one)
SPCsd Search in current directory (recursive)
SPCsS-d Search in another directory (recursive)

[notice] :pushpin: Search & Replace: C-cC-e after a search command to activate wgrep-mode. Now you may edit the results. Later, press C-cC-c (or ZZ , for evil users) to commit your changes. [/notice]

Scratch buffer

Key Description
SPCx or SPCbx Open global scratch buffer in a popup
SPCbS-x Switch to global scratch buffer in current window
SPCpx Open project-local scratch buffer in a popup
SPCpS-x Switch to project-local scratch buffer in current window

Window management

The following keys are all available under SPCw as well, if you prefer.

Key Description
C-ws Split the window horizontally
C-wv Split the window vertically
C-wd Delete current window
C-w {h,j,k,l} Select window in direction (left, below, above, right, respectively)
C-w {S-h,S-j,S-k,S-l} Swap current window with window in direction
C-w {C-S-h,C-S-j,C-S-k,C-S-l} Move current window to edge of frame in direction
C-wu or C-wC-r Undo or redo last change to window configuration
C-wo Enlargen current window. Again to undo.
C-wmm Delete other windows. Again to undo.
{N}C-w| Change width of current window to N (a number)
{N}C-w_ Change height of current window to N lines

For vanilla users

This reference sheet is for users with Evil disabled.

Tip

This list is not exhaustive. To look up what keys are available to you check out:

  • C-c h k followed by a key sequence to look up documentation on any command bound to it.
  • C-c h b b to search keybinds available in the current context.

There is no cheat sheet for vanilla users yet. For the time being refer to:

http://www.damtp.cam.ac.uk/user/sje30/ess11/resources/emacs-refcard.pdf

< back to index

Important

This gist is temporary until the new documentation (docs.doomemacs.org) and community wiki (wiki.doomemacs.org) have been published.

Magit keybind cheatsheet

This is a reference sheet for magit. The only sane way to interact with git. This won't be exhaustive list but it should make you pretty productive. Here are some other useful cheat sheets and guides:


Tip

You can get a comprehensiveness help sheet inside emacs by pressing ? inside magit

Tip

If the vanilla key is omitted, it's because it's the same as the evil key.

Entering magit

Evil Key Vannila Key Description
SPC g g C-c v g Open magit-status in current project

there is also the :magit ex command for evil users.

Leaving Magit

  • To close a buffer or window you should use q

  • To close a popup (transients) You should use C-g

In file commands

Evil Key Vanilla Key Description
SPC g s C-c v s Stage the current hunk in the current file
SPC g r C-c v r Revert the current hunk in the current file
SPC g B C-c v B Interactively blame a file

Basic interaction

Everything in the status buffer is interactive You can hit RET or TAB on almost anything in the buffer

Key Description
TAB Toggle the current heading
RET Expand an item
s Stage the current file/hunk
u Unstage the current item
S Stage all changes
U Unstage all changes
c c Commit all staged changes
l l Open up the git log

Branching

Key Description
b b Checkout branch
b c Create new branch
b x Delete branch
b s Create a new branch from the last commit

Merge and Rebase

Merge

Key Description
m m Merge another branch into the current branch
m i Merge the current branch into another branch

Rebase

Key Description
r p Rebase onto the default remote
r e Rebase onto a different remote or branch

Remote

Key Description
M a Add a remote
M x Remove a remote
M r rename a branch
M C Configure a remote

Fetch

Key Description
f p Fetch default remote
f e Fetch a different remote
f a Fetch all remotes

Pull

Key Description
F p Pull the default remote
F e Pull from a different remote

Push

Key Description
p p Push to the default remote
p e Push to a different remote

The git time machine

The git time machine allows you to quickly go through a files commits and explore changes over time interactively:

Evil Key Vanilla Key Description
SPC g t C-c v t Toggle the git time machine on the current file
C-j C-n Show the next revision
C-k C-p Show the previos revision
q Quit the time machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment