Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ngquct-feat-1048-apple-intelligence-transport.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Vim Mode

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

Modes

ModeHow to enter
NormalEsc
Inserti, I, a, A, o, O, s, S, c, C, gi
ReplaceR
Visualv
Visual LineV
Command line:, /, ?
gi puts you back where you last left insert.

Move the cursor

Characters

KeyGoes to
h j k lLeft, down, up, right
0Start of line
^ _First non-blank on line
$End of line

Words

KeyGoes to
w b eNext word, prev word, word end
W B ESame, whitespace-only word boundary
ge gEPrev word end, prev WORD end

Lines and pages

KeyGoes to
ggFirst line
GLast line
5GLine 5
H M LTop, middle, bottom of view
%Matching (), [], {}

Find a character

KeyGoes to
f{c}Next {c} on this line
F{c}Prev {c} on this line
t{c}Just before next {c}
T{c}Just after prev {c}
; ,Repeat last find, reverse last find

Sentences and paragraphs

KeyGoes to
( )Prev sentence, next sentence
{ }Prev blank line, next blank line
[[ ]]Prev {-at-col-0, next {-at-col-0
Counts work: 3w moves three words, 5j moves five lines down.

Edit

KeyAction
d{m}Delete (with motion)
c{m}Change (delete then enter insert)
y{m}Yank
dd cc yySame on the whole line
D C YSame as d$, c$, yy
x XDelete one char under, one before cursor
s SReplace one char or whole line, then insert
r{c}Replace one char with {c}, stay in normal
~Toggle case under cursor
g~{m} gu{m} gU{m}Toggle, lower, upper with motion
g~~ guu gUUSame on the whole line
>> <<Indent, outdent line
>{m} <{m}Indent, outdent with motion
JJoin next line with a space
gJJoin next line, no space
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.
ObjectInsideAround
Wordiwaw
WORDiWaW
" ' ` stringi" i' i`a" a' a`
( ) parensi( iba( ab
{ } bracesi{ iBa{ aB
[ ] bracketsi[a[
< > anglesi<a<
HTML tagitat
Paragraphipap
ciw rewrites the current word. da" removes a quoted string and its trailing space. yip copies the current paragraph.

Paste

KeyAction
pAfter cursor (or below the line for linewise yank)
PBefore cursor (or above the line)
3pPaste three times
In visual mode, p and P replace the selection with the register.

Registers

Prefix with "{a-z} to pick a register.
RegisterHolds
"Last yank or delete
"a"zNamed, overwrite
"A"ZSame, append
"0Last yank only
"1"9Delete ring, rotates on each delete
"ayy stores a line in a. "ap pastes it back later.

Marks

KeyAction
m{a-z}Set mark
`{a-z}Jump to exact mark
'{a-z}Jump to first non-blank of the mark’s line
`< `>Start, end of last visual selection
'' Back to position before the last jump
Marks shift when you insert or delete text before them.
KeyAction
/pattern EnterForward search
?pattern EnterBackward search
n NNext, previous match
* #Search word under cursor, forward or back
Searches wrap around.

Repeat and undo

KeyAction
.Repeat last change
uUndo
UUndo all edits on this line
Ctrl+RRedo
5. repeats the last change five times.

Macros

KeyAction
q{a-z}Start recording into a register
qStop recording
@{a-z}Play back
@@Play back the last macro
3@aPlay three times
Recursion is capped at 50 to keep self-calling macros safe.

Scroll

KeyAction
Ctrl+D Ctrl+UHalf page down, up
Ctrl+F Ctrl+BFull page down, up
Ctrl+E Ctrl+YOne line down, up
zt zz zbPut current line at top, middle, bottom
gj gkDown, up by visual line

Visual mode

Motions extend the selection. Then:
KeyAction
d xDelete
cDelete and insert
yYank
J gJJoin lines
~ u UToggle, lower, upper case
r{c}Replace each char with {c}
> <Indent, outdent
oMove cursor to the other end
I AInsert at start, end of selection
gvReselect the last visual selection

Insert mode shortcuts

KeyAction
Ctrl+WDelete the previous word
Ctrl+UDelete back to line start
Ctrl+HBackspace
Ctrl+TIndent line
Ctrl+DOutdent line
EscBack to normal

Numbers

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

Command line

CommandAction
:wRun the current query
:qClose the tab
:wq :xBoth
/ and ? are search. Other : commands are parsed and ignored.