Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Editor

The editor is a modal editor heavily inspired by vim.

Modes

ModeDescription
NormalNavigate.
CommandUse commands.
InsertInsert text.
VisualVisually select characters.
Visual LineVisually select lines.
Visual BlockVisually select blocks.
SearchSearch for text.

Common

CommandDescription
<Ctrl>-eScroll down.
<Ctrl>-yScroll up.

Normal Mode

CommandDescription
[modifier]<Movement>Move the cursor.
:Enter command mode.
iEnter insert mode.
aInsert after the cursor.
AInsert at the end of the line.
oOpen a line after the cursor and enter insert mode.
OOpen a line before the cursor and enter insert mode.
vEnter visual mode.
VEnter visual line mode.
<Ctrl>-vEnter visual block mode.
Insert a space.
y<movement>Yank.
yyYank the line.
pPaste after.
PPaste before.
xDelete a character.
d<movement>Delete the movement.
ddDelete the line.
rReplace a character.
uUndo.
<Ctrl>-rRedo.
/Enter search mode.
nGo to next search hit.
NGo to previous search hit.

Command Mode

CommandDescription
<Esc>Cancel the command and enter normal mode.
<Printable>Add the printable character to the command.
<Enter>Run the command and enter normal mode.
<Backspace>Backspace.

Commands

CommandDescription
wWrite the file.
qQuit (refuse if there are unwritten changes).
q!Quit (even if there are unwritten changes).
wqWrite and quit.
vimOpen the file in vim (refuse if there are unwritten changes).
vim!Open the file in vim (even if there are unwritten changes).

Insert Mode

CommandDescription
<Esc>Enter normal mode.
<Printable>Insert the printable character.
<Tab>Enter 4 spaces.
<Enter>Enter a newline character.
<Backspace>Backspace.
<Paste>Insert the clipboard.

Common Visual

Visual modes share many of the same commands.

CommandDescription
<Esc>Enter normal mode.
[modifier]<Movement>Move the cursor.
yYank.
YYank to clipboard.
x | dDelete the selection.
uLowercase the selection.
UUppercase the selection.
rReplace the selection.
pReplace the selection with the paste buffer.

Visual Mode

CommandDescription
VEnter visual line mode.
<Ctrl>-vEnter visual block mode.

Visual Line Mode

CommandDescription
vEnter visual mode.
<Ctrl>-vEnter visual block mode.

Visual Block Mode

CommandDescription
vEnter visual mode.
VEnter visual line mode.

Search Mode

CommandDescription
<Esc>Cancel the search and enter normal mode.
<Enter>Go to the next hit.
<Printable>Add the printable character to the search.
<Backspace>Backspace.

Modifiers

ModifierDescription
<Num>Perform the action the specified number of times.

Movements

MovementDescription
hLeft.
jDown.
kUp.
lRight.
wStart of next word.
WStart of next WORD.
bStart of previous word.
BStart of previous WORD.
eEnd of current/next word.
EEnd of current/next WORD.
0Beginning of line.
$End of line.
J | GEnd of file or line number if a number modifier is used.
K | ggBeginning of file.