Skip to main content

Vim Mode

Turn on vim mode in Settings > Editor > Vim mode. A badge next to the editor shows the current mode.
Vim mode badge

Mode badge in the SQL editor

Modes

gi puts you back where you last left insert.

Move the cursor

Characters

Words

Lines and pages

Find a character

Sentences and paragraphs

Counts work: 3w moves three words, 5j moves five lines down.

Edit

2d3w deletes six words. 3yy yanks three lines. 5>> indents five lines. Yank, delete, and change all write to the system clipboard.

Text objects

Use after d, c, y, or in visual mode. ciw rewrites the current word. da" removes a quoted string and its trailing space. yip copies the current paragraph.

Paste

In visual mode, p and P replace the selection with the register.

Registers

Prefix with "{a-z} to pick a register. "ayy stores a line in a. "ap pastes it back later.

Marks

Marks shift when you insert or delete text before them. The pattern is a literal, case-sensitive substring, not a regex. Searches wrap around.

Repeat and undo

5. repeats the last change five times.

Macros

Recursion is capped at 50 to keep self-calling macros safe.

Scroll

Visual mode

Motions extend the selection. Then: Indent and outdent work in normal mode only (>>, <<, >{m}, <{m}).

Insert mode shortcuts

Numbers

Ctrl+A adds one to the next number on the line. Ctrl+X subtracts one. Both honor a count (5 Ctrl+A), negative numbers, and 0x hex.

Command line

/ and ? are search. Other : commands, including :wq and :x, are parsed and ignored.