Skip to content

Vim Compose

The compose editor supports vim-style modal editing. Toggle with Escape (insert → normal) and configurable exit sequences (e.g. jk).

Modes

ModeDescription
InsertNormal typing, like a regular editor
NormalNavigation and editing commands
VisualCharacter-wise selection (v)
Visual LineLine-wise selection (V)

Navigation

KeyAction
h j k lLeft, down, up, right
wNext word
bPrevious word
eEnd of word
0Beginning of line
$End of line
ggTop of document
GBottom of document
%Jump to matching bracket
f/F + charFind char forward/backward
t/T + charFind char (till) forward/backward
; ,Repeat last find / reverse

All navigation commands support count prefixes (e.g. 5j moves down 5 lines).

Operators

KeyAction
d + motionDelete
c + motionChange (delete + insert mode)
y + motionYank (copy)
ddDelete line
ccChange line
yyYank line
DDelete to end of line
CChange to end of line

Text Objects

Operators can be combined with text objects: d/c/y + i/a + object.

KeyObject
iw / awInner/around word
iW / aWInner/around WORD (whitespace-delimited)
i" / a"Inner/around double quotes
i' / a'Inner/around single quotes
i` / a`Inner/around backticks
i( / a(Inner/around parentheses
i{ / a{Inner/around curly braces
i[ / a[Inner/around square brackets
i< / a<Inner/around angle brackets

Examples: ciw (change word), di" (delete inside quotes), ya( (yank around parens).

Editing

KeyAction
xDelete character under cursor
XDelete character before cursor
r + charReplace character
~Toggle case
JJoin lines
>>Indent line
<<Outdent line
uUndo
Ctrl+rRedo
.Repeat last action

Insert Mode Entry

KeyAction
iInsert before cursor
aInsert after cursor
IInsert at beginning of line
AInsert at end of line
oOpen line below
OOpen line above

Visual Mode

KeyAction
vToggle character-wise visual
VToggle line-wise visual
d / c / yOperate on selection
i/a + objectSelect text object

Search

KeyAction
/Open search bar
EnterSearch and close bar
nNext match
NPrevious match

Clipboard

KeyAction
pPaste after cursor (line-aware)
PPaste before cursor (line-aware)

Yank and delete operations copy to the system clipboard.

Configuration

Exit sequences for insert → normal mode are configured in keymaps.pkl:

keymaps {
  new { action = "exit_insert"; key = "jk"; context = "compose_normal"; sequence = true }
}