<N>doom-emacs-guide.orgA beginner's field guideDoom One · Doom One Light · Plain dark

Doom Emacs, taken apart

Doom is a configuration framework for GNU Emacs: Vim's keys through evil, a menu of ready-made modules, a fast startup, and a doom command-line tool to keep it all in sync. Four ideas cover almost everything a beginner trips over. Each one is built below as a small machine you can operate. Click a machine, then type on your keyboard. To practise on the real thing as you read, open Doom beside the lessons with the button at the bottom right.

00

Install

You need GNU Emacs 27.1–31.1 (31.1 recommended), git, ripgrep 11 or newer and, optionally, fd for faster file finding. Then clone Doom into Emacs's config directory and let it install itself:

git clone --depth 1 https://github.com/doomemacs/core ~/.config/emacs
~/.config/emacs/bin/doom install

The installer asks a few questions, creates your private config in ~/.config/doom (or ~/.doom.d) and downloads every package your modules need. Put the doom tool on your path so you can run it from anywhere:

export PATH="$HOME/.config/emacs/bin:$PATH"   # in ~/.zshrc or ~/.bashrc
doom doctor                                   # checks fonts, tools and versions

Doom moved: the project now lives at github.com/doomemacs/core, with modules in doomemacs/modules. Older guides that clone doomemacs/doomemacs or ~/.emacs.d still describe the same ideas.

Start Emacs and you land on the dashboard. Press SPC and wait a moment: a menu appears. That menu is section 02. First, the thing that makes Doom feel strange: modes.

01

Modes: keys that mean different things

In most editors every key types a letter. In Doom (through evil, a faithful Vim emulation) the keyboard has states. In Normal state, the one you start in, keys are commands: w jumps a word, d deletes. In Insert state keys type text, as you're used to. In Visual state motions grow a selection. ESC (or C-g) always brings you back to Normal. When in doubt, press it.

Normal-state commands form a small grammar: operator + optional count + motion. dw deletes to the next word, ciw changes the word under the cursor, yy copies a line, 3j moves three lines down. Learn ten motions and three operators and you have hundreds of commands.

esciaIAvuhlwbe0$xdEVIL STATENIV
Cursor shoe: where the next key acts (a block in NORMAL, a blade in INSERT)Type sorts: the buffer's text, one per characterMode lever N · I · V, and the undo spike: one slug per changeEvil gives Doom three main states. In NORMAL every key is a command: w, b and e hop the shoe by words, x and d take type out (d waits for a motion: dw, de, d$, dd) and u undoes one change. i, a, I and A switch to INSERT, where keys set new type into the line. v starts VISUAL: the anchor jaw stays put while motions grow the clamp, and d removes the whole clamp. ESC always brings you back to NORMAL.

Try it on the machine

  1. Click the machine, press w a few times. The cursor shoe hops from word to word; nothing is typed.
  2. Press i. The lever drops to I, the shoe becomes a thin blade, and now letters are set into the line.
  3. Press ESC, then ved: select to the end of a word and delete it into the hell box. u brings it back.

Getting into Insert

KeysWhat it does
iinsert before the cursor
aappend after the cursor
IAinsert at line start / end
oOopen a new line below / above
ESCorC-gback to Normal

Moving (motions)

KeysWhat it does
hjklleft, down, up, right
wbenext word, back a word, word end
0^$line start, first character, line end
ggGtop / bottom of the buffer
f{c}t{c}jump to / just before character c
/textnNsearch, next match, previous match

Operators and friends

KeysWhat it does
dcydelete, change, yank (copy), plus a motion
ddccyythe same, on the whole line
xpdelete a character, paste
uC-rundo, redo
.repeat the last change
gccomment (gcc a line, gcip a paragraph)

Text objects and Visual

KeysWhat it does
iwawinner word / a word with its space
i"i(ipinside quotes, parens, paragraph
ifiaigDoom extras: function, argument, whole buffer
vVC-vvisual by character, line, block
:w:qsave; close the window (Ex commands)

02

The leader key: every command is a path

Doom puts its commands behind one key, the leader: SPC in Normal state (M-SPC while you're in Insert state). After SPC you type a short mnemonic path: SPCff is file → find file, SPCbk is buffer → kill, SPCwv is window → vertical split. If you pause midway, which-key pops up a menu of every branch from where you are, so you only ever need to remember one level at a time. ESC abandons a half-typed path. SPCm is the local leader, with commands for the kind of file you're in (Org, Python…).

which-key+file+buffer+window+project+search+gitfrspbknpvscwSPC.:pfbkspdigbBtSPCESCqwertyuiopasdfghjkl:zxcvbnm,.SPC
The ball and the gate it is waiting in: your key sequence so far27 cups, one per commandThe which-key board: the keys that continue from hereEvery Doom command lives at the end of a path. SPC starts the path (M-SPC in insert mode), each key turns one gate, and the which-key board shows only the branches that continue from where the ball is waiting, so you never memorise more than one level at a time. ESC (or C-g) drops the ball and cancels; a key with no branch is undefined. The table shows six of Doom's prefixes and their most used keys; the real tree has many more.

Try it on the machine

  1. Click, then press SPC. A ball drops to the first junction and the board lists the top-level branches.
  2. Press f. The gate throws, the ball rolls on and waits, and the board flips to the +file commands.
  3. Press f again: the ball lands in find-file. Try SPCfz to see an unbound path rejected.

One keystroke after SPC

KeysWhat it does
SPCSPCfind a file in this project
SPC.find a file anywhere
SPC,switch buffer
SPC/search the project (ripgrep)
SPC:M-x: run any command by name
SPCxtoggle a scratch buffer

The prefixes

PrefixBranch
SPCf+file: find, recent, save, rename
SPCb+buffer: switch, kill, next, previous
SPCw+window: split, move, close
SPCp+project: switch project, find in project
SPCs+search: buffer, project, symbol
SPCg+git: magit status, blame, branch
SPCo+open: terminal, sidebar, dired
SPCh+help: describe key, function, variable
SPCq+quit: quit, restart

Lost? SPChk then any key tells you exactly what that key runs. SPC: finds any command by name and shows its key binding next to it, so the shortcuts teach themselves.

03

Buffers, windows and the frame

Three words cause most of the confusion. A buffer is text held in memory: usually a file you opened, sometimes something else, like *scratch*, *Messages* or the *doom* dashboard. A window is a view onto a buffer; split the screen and you have two windows, which may show two buffers or the same one twice. The frame is what your operating system calls a window: the whole Emacs box.

The consequences are the useful part. Closing a window loses nothing: the buffer is still open, one SPC, away. Killing a buffer removes the text from memory, and Doom asks first if there are unsaved changes. A file on disk only changes when you save.

config.elinit.elnotes.orgpackages.elmain.pyREADME.md~/filesparkSPCbnpkwvsc.
Active window: its finger and its modelineSlides in the carousel: your buffersWindow panes on the frame's screenA buffer is text held in memory, a window is a view of one buffer, and the frame holds the windows. SPC b n turns the active finger to the next slide; SPC w v and SPC w s add a pane and a finger showing the same buffer; SPC w c closes a pane and parks its finger, but the slide stays in the tray. SPC b k pulls the slide out (Doom asks first if it is unsaved), and every window that showed it moves to another buffer. SPC . reads a file card from the drawer into a new slide: the file on disk is untouched until you save.

Try it on the machine

  1. Click, then SPCbn: the active window's finger moves to the next slide in the tray.
  2. SPCwv splits the screen. A second finger appears, pointing at the same slide.
  3. SPCwc closes that window. Its finger parks, and every slide is still in the tray.

Buffers

KeysWhat it does
SPC,switch buffer (this workspace)
SPCbnnext buffer
SPCbpprevious buffer
SPCbkkill this buffer
SPCbssave this buffer
SPCbNnew empty buffer
SPC`jump back to the last buffer

Windows

KeysWhat it does
SPCwvsplit side by side
SPCwssplit stacked
SPCwhorSPCwlmove to the window left / right (j k: down / up)
SPCwwnext window
SPCwcclose this window
SPCwmmmaximize this window
SPCw=make windows equal size

Two more containers sit around these. A project is any folder under version control: SPCpp switches project, SPCSPC finds a file inside it and SPC/ searches it. A workspace (SPCTAB) is a named set of buffers and window layouts, like a browser tab group, so each project keeps its own buffer list. Pop-ups such as the terminal (SPCot) are ordinary windows that Doom places and closes for you.

04

Config and doom sync

Everything that is yours lives in three files in ~/.config/doom (open them with SPCfP). Doom's own code in ~/.config/emacs is never edited by hand.

init.el: which modules are on

A single doom! block lists the modules you want, grouped by category. Uncomment a line to turn a module on; add +flags for its options. Put the cursor on a module and press K for its documentation.

(doom! :completion
       (corfu +orderless)
       vertico
       :ui
       doom dashboard modeline workspaces
       :editor
       (evil +everywhere)
       :tools
       magit lsp
       :lang
       emacs-lisp org
       (python +lsp))

packages.el: extra packages

For anything not covered by a module. Declare it here; Doom fetches and pins it on the next sync.

(package! beacon)                          ; from MELPA
(package! some-mode
  :recipe (:host github :repo "you/some-mode"))
(package! evil-snipe :disable t)           ; turn off one Doom ships

config.el: your settings

Plain Emacs Lisp, run at startup. Settings for a package go inside with-eval-after-load so Doom's defaults don't overwrite them.

(setq doom-theme 'doom-one
      doom-font (font-spec :family "JetBrains Mono" :size 14)
      display-line-numbers-type 'relative)

(with-eval-after-load 'org
  (setq org-log-done 'time))

(map! :n "C-s" #'save-buffer)              ; your own key

The rule that saves the most confusion: Doom does not read init.el or packages.el on its own. After editing either, run doom sync in a shell, then restart Emacs. It installs or removes packages and rebuilds Doom's caches. config.el needs no sync, only a restart (SPCqr).

init.el:completionverticocorfu:uidoomdashboardmodeline:editorevilsnippets:toolsmagitlsp:langemacs-lisporgpythonpackages.elolivettivundobeaconnyan-modefocusimenu-listSPC q rdoom syncSTALE.localmodulespackagesdoom syncin a shellSPC q rin Emacs$ doom sync> installing packages> building autoloads✓ now restart emacslogconfig.elthemeonelightfont12141618numberstrelnil
STALE lamp: run doom sync · monitor lamp: restart EmacsYour config: init.el switches, packages.el cartridges, config.el knobs.local magazine: what doom sync installedYour private config is three files in ~/.config/doom. Flip a module in init.el or add a package! to packages.el and nothing happens yet: the STALE lamp asks for doom sync, which installs and builds what changed. Even then the running Emacs keeps its old setup until you restart it. config.el settings (theme, font, line numbers) need no sync, only a restart. When in doubt, run doom sync, then doom doctor.

Try it on the machine

  1. Flip a module switch. The stale lamp lights: the running Emacs knows nothing about it yet.
  2. Press r to restart now. The screen reboots but the change is missing, because nothing was synced.
  3. Press s to sync, then r. Now it loads. Turn a config.el knob and only a restart is needed.
You changed…RunThen
init.el (modules, flags)doom syncrestart Emacs
packages.eldoom syncrestart Emacs
config.elnothingrestart Emacs (SPCqr)
Emacs itself, or things feel brokendoom sync, then doom doctorrestart Emacs
You want the latest Doomdoom upgraderestart Emacs

05

Cheat sheet

Print this, or keep it in a buffer. Everything here is a default binding in a stock Doom install with (evil +everywhere); SPCg needs the magit module and SPCot and SPCop a terminal and a sidebar module.

Modes

ESCorC-g
back to Normal
iao
insert, append, new line
vV
visual char / line
uC-r
undo / redo
.
repeat last change

Move

hjkl
by character / line
wbe
by word
0$
line start / end
ggG
buffer top / bottom
/nN
search, next, previous

Edit

dwcw
delete / change word
ddyyp
cut line, copy line, paste
ciwci"
change word, change in quotes
gcc
comment line
x
delete character

Files

SPC.
find file
SPCfr
recent files
SPCfs
save
SPCfR
rename / move
SPCfP
your Doom config

Buffers

SPC,
switch
SPCbn
next
SPCbk
kill
SPC`
last buffer
SPCx
scratch

Windows

SPCwv
split side by side
SPCws
split stacked
SPCwl
move right (h j k l)
SPCwc
close
SPCwmm
maximize

Projects & search

SPCpp
switch project
SPCSPC
find in project
SPC/
search project
SPCss
search buffer
SPCsi
jump to symbol

Git, open, help

SPCgg
magit status
SPCot
terminal popup
SPCop
project sidebar
SPChk
what does this key do?
SPC:
run any command

Shell

doom sync
after init.el / packages.el
doom doctor
diagnose problems
doom upgrade
update Doom
SPCqr
restart Emacs
SPCqq
quit Emacs

06

Your first week

  1. Day 1. Survive. Install, run doom doctor, open a scratch buffer with SPCx. Practise i, typing, ESC, :w. Nothing else.
  2. Day 2. Move without arrows. hjkl, wbe, 0$, ggG, and search with /.
  3. Day 3. Edit with verbs. d, c, y with motions and text objects; u and . constantly.
  4. Day 4. Follow the leader. Press SPC, read the menu, pick a branch. Open files with SPC. and SPCfr.
  5. Day 5. Projects. SPCpp into a repo, SPCSPC to find files, SPC/ to search, SPCgg for git.
  6. Day 6. Split the screen. SPCwv, SPCwl, SPC,. Close windows freely; your buffers stay open.
  7. Day 7. Make it yours. Set a font and theme in config.el, enable one language module in init.el, run doom sync, restart.

Key bindings and file layouts on this page were checked against the Doom sources (doomemacs/core and doomemacs/modules, October 2026). Modules can change bindings; when in doubt, ask Doom: SPChk.

07

Real Doom, in this page

The machines above are models. This is the real thing: GNU Emacs 30.2 compiled to WebAssembly, running Doom (evil, which-key, vertico, org, the dashboard) in a worker thread, with a terminal drawn by xterm.js. Your files under ~ and your Doom config are saved in the browser's private file system (OPFS), so they survive a reload. Nothing is installed and nothing leaves the tab.

Your home folder starts with a project to practise on: this guide's own source, in ~/emacs-learn. Press SPCpp and pick it, then SPCSPC to jump to any of its files, SPCss to search inside one, SPC, to switch buffers and SPCwv to split. SPCop opens the file tree (treemacs): jk to move, TAB to open a folder, RET to open a file. It is your copy: edits are saved in the browser. Delete the folder and reload for a fresh one.

Doom Emacs · click in to type · practice project: SPCpp
open in its own tab plain Emacs start fresh (erases saved files)

About 6 MB on first start. Click into the terminal and press SPC.

Doom is docked beside the lessons.

It needs a page served with cross-origin isolation (for SharedArrayBuffer). Opened as a file this section can't start; run node wasm/web/serve.mjs in this project and open http://localhost:8080/guide/. What doesn't work in a browser: anything that runs another program, such as magit (no git), project search (no ripgrep), terminals and LSP. Restarting Emacs means reloading the page.