Neovim / Vim Keyboard Shortcuts

Complete Neovim / Vim keyboard shortcuts and commands reference — 594 shortcuts across 10 categories. Quick reference cheat sheet for Windows & Mac.

This is the ten-command starter card for Neovim (and Vim): modes, the two most common edits, undo, search and replace. It is deliberately minimal so a first session is not a wall; the full Vim page and the advanced quickref on this site go deeper. Neovim shares all of these with Vim, so the card applies to both.

Insert mode (87)

ShortcutActionWhat it does
Ctrl + @Insert previously inserted text and stop insertInsert previously inserted text and stop insert.
Ctrl + AInsert previously inserted textInsert previously inserted text.
Ctrl + CQuit insert mode, without checking for abbreviationQuit insert mode, without checking for abbreviation.
Ctrl + DDelete one shiftwidth of indent in the current lineDelete one shiftwidth of indent in the current line.
Ctrl + EInsert the character which is below the cursor re-indent the current line)Insert the character which is below the cursor re-indent the current line).
Ctrl + G Ctrl + JLine down, to column where inserting startedLine down, to column where inserting started.
Ctrl + G jLine down, to column where inserting startedLine down, to column where inserting started.
Ctrl + G DownLine down, to column where inserting startedLine down, to column where inserting started.
Ctrl + G Ctrl + KLine up, to column where inserting startedLine up, to column where inserting started.
Ctrl + G kLine up, to column where inserting startedLine up, to column where inserting started.
Ctrl + G UpLine up, to column where inserting startedLine up, to column where inserting started.
Ctrl + G uStart new undoable editStart new undoable edit.
Ctrl + G UDon't break undo with next cursor movementDon't break undo with next cursor movement.
BackspaceDelete character before the cursorDelete character before the cursor.
Ctrl + HSame as <BS>Same as <BS>.
TabInsert a <Tab> characterInsert a <Tab> character.
Ctrl + ISame as <Tab>Same as <Tab>.
<NL>Same as <CR>Same as <CR>.
Ctrl + JSame as <CR> enter digraphSame as <CR> enter digraph.
EnterBegin new lineBegin new line.
Ctrl + MSame as <CR>Same as <CR>.
Ctrl + NFind next match for keyword in front of the cursorFind next match for keyword in front of the cursor.
Ctrl + OExecute a single command and return to insert modeExecute a single command and return to insert mode.
Ctrl + PFind previous match for keyword in front of the cursorFind previous match for keyword in front of the cursor.
Ctrl + QSame as CTRL-V, unless used for terminal control flowSame as CTRL-V, unless used for terminal control flow.
Ctrl + TInsert one shiftwidth of indent in current lineInsert one shiftwidth of indent in current line.
Ctrl + UDelete all entered characters in the current lineDelete all entered characters in the current line.
Ctrl + V {char}Insert next non-digit literallyInsert next non-digit literally.
Ctrl + WDelete word before the cursorDelete word before the cursor.
Ctrl + X {mode}Enter CTRL-X sub mode, seeEnter CTRL-X sub mode, see.
Ctrl + YInsert the character which is above the cursorInsert the character which is above the cursor.
EscEnd insert modeEnd insert mode.
Ctrl + [Same as <Esc>Same as <Esc>.
Ctrl + \ Ctrl + NGo to Normal modeGo to Normal mode.
Ctrl + \ Ctrl + GGo to Normal modeGo to Normal mode.
Ctrl + ]Trigger abbreviationTrigger abbreviation.
Ctrl + ^Toggle use of mappingsToggle use of mappings.
Ctrl + _When 'allowrevins' set: toggle 'revins'When 'allowrevins' set: toggle 'revins'.
0 Ctrl + DDelete all indent in the current lineDelete all indent in the current line.
^ Ctrl + DDelete all indent in the current line, restore it in the next lineDelete all indent in the current line, restore it in the next line.
DeleteDelete character under the cursorDelete character under the cursor.
LeftCursor one character leftCursor one character left.
<S-Left>Cursor one word leftCursor one word left.
<C-Left>Cursor one word leftCursor one word left.
RightCursor one character rightCursor one character right.
<S-Right>Cursor one word rightCursor one word right.
<C-Right>Cursor one word rightCursor one word right.
UpCursor one line upCursor one line up.
<S-Up>Same as <PageUp>Same as <PageUp>.
DownCursor one line downCursor one line down.
<S-Down>Same as <PageDown>Same as <PageDown>.
HomeCursor to start of lineCursor to start of line.
<C-Home>Cursor to start of fileCursor to start of file.
EndCursor past end of lineCursor past end of line.
<C-End>Cursor past end of fileCursor past end of file.
Page UpOne screenful backwardOne screenful backward.
Page DownOne screenful forwardOne screenful forward.
<F1>Same as <Help>Same as <Help>.
<Help>Stop insert mode and display help windowStop insert mode and display help window.
InsertToggle Insert/Replace modeToggle Insert/Replace mode.
<LeftMouse>Cursor at mouse clickCursor at mouse click.
<ScrollWheelDown>Move window three lines downMove window three lines down.
<S-ScrollWheelDown>Move window one page downMove window one page down.
<ScrollWheelUp>Move window three lines upMove window three lines up.
<S-ScrollWheelUp>Move window one page upMove window one page up.
<ScrollWheelLeft>Move window six columns leftMove window six columns left.
<S-ScrollWheelLeft>Move window one page leftMove window one page left.
<ScrollWheelRight>Move window six columns rightMove window six columns right.
<S-ScrollWheelRight>Move window one page rightMove window one page right.
Ctrl + X Ctrl + DComplete defined identifiersComplete defined identifiers.
Ctrl + X Ctrl + EScroll upScroll up.
Ctrl + X Ctrl + FComplete file namesComplete file names.
Ctrl + X Ctrl + IComplete identifiersComplete identifiers.
Ctrl + X Ctrl + KComplete identifiers from dictionaryComplete identifiers from dictionary.
Ctrl + X Ctrl + LComplete whole linesComplete whole lines.
Ctrl + X Ctrl + NNext completionNext completion.
Ctrl + X Ctrl + OOmni completionOmni completion.
Ctrl + X Ctrl + PPrevious completionPrevious completion.
Ctrl + X Ctrl + RComplete contents from registersComplete contents from registers.
Ctrl + X Ctrl + SSpelling suggestionsSpelling suggestions.
Ctrl + X Ctrl + TComplete identifiers from thesaurusComplete identifiers from thesaurus.
Ctrl + X Ctrl + YScroll downScroll down.
Ctrl + X Ctrl + UComplete with 'completefunc'Complete with 'completefunc'.
Ctrl + X Ctrl + VComplete like in : command lineComplete like in : command line.
Ctrl + X Ctrl + ZStop completion, text is unchangedStop completion, text is unchanged.
Ctrl + X Ctrl + ]Complete tagsComplete tags.
Ctrl + X sSpelling suggestionsSpelling suggestions.

Normal mode (198)

ShortcutActionWhat it does
Ctrl + A2 add N to number at/after cursor2 add N to number at/after cursor.
Ctrl + B1 scroll N screens Backwards1 scroll N screens Backwards.
Ctrl + CInterrupt current (search) commandInterrupt current (search) command.
Ctrl + DScroll Down N lines (default: half a screen)Scroll Down N lines (default: half a screen).
Ctrl + EScroll N lines upwards (N lines Extra)Scroll N lines upwards (N lines Extra).
Ctrl + F1 scroll N screens Forward1 scroll N screens Forward.
Ctrl + GDisplay current file name and positionDisplay current file name and position.
Backspace1 same as "h"1 same as "h".
Ctrl + H1 same as "h"1 same as "h".
Tab1 go to N newer entry in jump list1 go to N newer entry in jump list.
Ctrl + I1 same as <Tab>1 same as <Tab>.
<NL>1 same as "j"1 same as "j".
<S-NL>1 same as CTRL-F1 same as CTRL-F.
Ctrl + J1 same as "j"1 same as "j".
Ctrl + LRedraw screenRedraw screen.
Enter1 cursor to the first CHAR N lines lower1 cursor to the first CHAR N lines lower.
<S-CR>1 same as CTRL-F1 same as CTRL-F.
Ctrl + M1 same as <CR>1 same as <CR>.
Ctrl + N1 same as "j"1 same as "j".
Ctrl + O1 go to N older entry in jump list1 go to N older entry in jump list.
Ctrl + P1 same as "k"1 same as "k".
Ctrl + R2 redo changes which were undone with 'u'2 redo changes which were undone with 'u'.
Ctrl + TJump to N older Tag in tag listJump to N older Tag in tag list.
Ctrl + UScroll N lines Upwards (default: half a screen)Scroll N lines Upwards (default: half a screen).
Ctrl + VStart blockwise Visual modeStart blockwise Visual mode.
Ctrl + W {char}Window commands, seeWindow commands, see.
Ctrl + X2 subtract N from number at/after cursor2 subtract N from number at/after cursor.
Ctrl + YScroll N lines downwardsScroll N lines downwards.
Ctrl + ZSuspend program (or start new shell)Suspend program (or start new shell).
Ctrl + \ Ctrl + NGo to Normal mode (no-op)Go to Normal mode (no-op).
Ctrl + \ Ctrl + GGo to Normal mode (no-op)Go to Normal mode (no-op).
Ctrl + ]:ta to ident under cursor:ta to ident under cursor.
Ctrl + ^Edit Nth alternate file (equivalent to ":e #N")Edit Nth alternate file (equivalent to ":e #N").
Ctrl + TabSame as `g<Tab>` : go to last accessed tab pageSame as `g<Tab>` : go to last accessed tab page.
Space1 same as "l"1 same as "l".
!{motion}{filter}2 filter Nmove text through the {filter} command2 filter Nmove text through the {filter} command.
!!{filter}2 filter N lines through the {filter} command2 filter N lines through the {filter} command.
"{register}Use {register} for next delete, yank or put ({.%#:} only work with put)Use {register} for next delete, yank or put ({.%#:} only work with put).
#1 search backward for the Nth occurrence of the ident under the cursor1 search backward for the Nth occurrence of the ident under the cursor.
$1 cursor to the end of Nth next line1 cursor to the end of Nth next line.
{count}%1 go to N percentage in the file1 go to N percentage in the file.
&2 repeat last :s2 repeat last :s.
'{a-zA-Z0-9}1 cursor to the first CHAR on the line with mark {a-zA-Z0-9}1 cursor to the first CHAR on the line with mark {a-zA-Z0-9}.
''1 cursor to the first CHAR of the line where the cursor was before the latest jump1 cursor to the first CHAR of the line where the cursor was before the latest jump.
'(1 cursor to the first CHAR on the line of the start of the current sentence1 cursor to the first CHAR on the line of the start of the current sentence.
')1 cursor to the first CHAR on the line of the end of the current sentence1 cursor to the first CHAR on the line of the end of the current sentence.
'<1 cursor to the first CHAR of the line where highlighted area starts/started in the current buffer1 cursor to the first CHAR of the line where highlighted area starts/started in the current buffer.
'>1 cursor to the first CHAR of the line where highlighted area ends/ended in the current buffer1 cursor to the first CHAR of the line where highlighted area ends/ended in the current buffer.
'[1 cursor to the first CHAR on the line of the start of last operated text or start of put text1 cursor to the first CHAR on the line of the start of last operated text or start of put text.
']1 cursor to the first CHAR on the line of the end of last operated text or end of put text1 cursor to the first CHAR on the line of the end of last operated text or end of put text.
'{1 cursor to the first CHAR on the line of the start of the current paragraph1 cursor to the first CHAR on the line of the start of the current paragraph.
'}1 cursor to the first CHAR on the line of the end of the current paragraph1 cursor to the first CHAR on the line of the end of the current paragraph.
(1 cursor N sentences backward1 cursor N sentences backward.
)1 cursor N sentences forward1 cursor N sentences forward.
*1 search forward for the Nth occurrence of the ident under the cursor1 search forward for the Nth occurrence of the ident under the cursor.
+1 same as <CR>1 same as <CR>.
<S-+>1 same as CTRL-F1 same as CTRL-F.
,1 repeat latest f, t, F or T in opposite direction N times1 repeat latest f, t, F or T in opposite direction N times.
-1 cursor to the first CHAR N lines higher1 cursor to the first CHAR N lines higher.
<S-->1 same as CTRL-B1 same as CTRL-B.
.2 repeat last change with count replaced with N2 repeat last change with count replaced with N.
/{pattern}Enter1 search forward for the Nth occurrence of {pattern}1 search forward for the Nth occurrence of {pattern}.
/Enter1 search forward for {pattern} of last search1 search forward for {pattern} of last search.
01 cursor to the first char of the line1 cursor to the first char of the line.
1Prepend to command to give a countPrepend to command to give a count.
2"".
3"".
4"".
5"".
6"".
7"".
8"".
9"".
:1 start entering an Ex command1 start entering an Ex command.
{count}:Start entering an Ex command with range from current line to N-1 lines downStart entering an Ex command with range from current line to N-1 lines down.
;1 repeat latest f, t, F or T N times1 repeat latest f, t, F or T N times.
<{motion}2 shift Nmove lines one 'shiftwidth' leftwards2 shift Nmove lines one 'shiftwidth' leftwards.
<<2 shift N lines one 'shiftwidth' leftwards2 shift N lines one 'shiftwidth' leftwards.
={motion}2 filter Nmove lines through "indent"2 filter Nmove lines through "indent".
==2 filter N lines through "indent"2 filter N lines through "indent".
>{motion}2 shift Nmove lines one 'shiftwidth' rightwards2 shift Nmove lines one 'shiftwidth' rightwards.
>>2 shift N lines one 'shiftwidth' rightwards2 shift N lines one 'shiftwidth' rightwards.
?{pattern}Enter1 search backward for the Nth previous occurrence of {pattern}1 search backward for the Nth previous occurrence of {pattern}.
?Enter1 search backward for {pattern} of last search1 search backward for {pattern} of last search.
@{a-z}2 execute the contents of register {a-z} N times2 execute the contents of register {a-z} N times.
@:Repeat the previous ":" command N timesRepeat the previous ":" command N times.
@@2 repeat the previous @{a-z} N times2 repeat the previous @{a-z} N times.
A2 append text after the end of the line N times2 append text after the end of the line N times.
B1 cursor N WORDS backward1 cursor N WORDS backward.
["x]C2 change from the cursor position to the end of the line, and N-1 more lines [into register x]; synonym for "c$"2 change from the cursor position to the end of the line, and N-1 more lines [into register x]; synonym for "c$".
["x]D2 delete the characters under the cursor until the end of the line and N-1 more lines [into register x]; synonym for "d$"2 delete the characters under the cursor until the end of the line and N-1 more lines [into register x]; synonym for "d$".
E1 cursor forward to the end of WORD N1 cursor forward to the end of WORD N.
F{char}1 cursor to the Nth occurrence of {char} to the left1 cursor to the Nth occurrence of {char} to the left.
G1 cursor to line N, default last line1 cursor to line N, default last line.
H1 cursor to line N from top of screen1 cursor to line N from top of screen.
I2 insert text before the first CHAR on the line N times2 insert text before the first CHAR on the line N times.
J2 Join N lines; default is 22 Join N lines; default is 2.
KLookup Keyword under the cursor with 'keywordprg'Lookup Keyword under the cursor with 'keywordprg'.
L1 cursor to line N from bottom of screen1 cursor to line N from bottom of screen.
M1 cursor to middle line of screen1 cursor to middle line of screen.
N1 repeat the latest '/' or '?' N times in opposite direction1 repeat the latest '/' or '?' N times in opposite direction.
O2 begin a new line above the cursor and insert text, repeat N times2 begin a new line above the cursor and insert text, repeat N times.
["x]P2 put the text [from register x] before the cursor N times2 put the text [from register x] before the cursor N times.
R2 enter replace mode: overtype existing characters, repeat the entered text N-1 times2 enter replace mode: overtype existing characters, repeat the entered text N-1 times.
["x]S2 delete N lines [into register x] and start insert; synonym for "cc"2 delete N lines [into register x] and start insert; synonym for "cc".
T{char}1 cursor till after Nth occurrence of {char} to the left1 cursor till after Nth occurrence of {char} to the left.
U2 undo all latest changes on one line2 undo all latest changes on one line.
VStart linewise Visual modeStart linewise Visual mode.
W1 cursor N WORDS forward1 cursor N WORDS forward.
["x]X2 delete N characters before the cursor [into register x]2 delete N characters before the cursor [into register x].
["x]YYank N lines [into register x]; synonym for "yy" Note: Mapped to "y$" by default.Yank N lines [into register x]; synonym for "yy" Note: Mapped to "y$" by default..
ZZWrite if buffer changed and close windowWrite if buffer changed and close window.
ZQClose window without writingClose window without writing.
[{char}Square bracket command (see below)Square bracket command (see below).
]{char}Square bracket command (see below)Square bracket command (see below).
^1 cursor to the first CHAR of the line1 cursor to the first CHAR of the line.
_1 cursor to the first CHAR N - 1 lines lower1 cursor to the first CHAR N - 1 lines lower.
`{a-zA-Z0-9}1 cursor to the mark {a-zA-Z0-9}1 cursor to the mark {a-zA-Z0-9}.
`(1 cursor to the start of the current sentence1 cursor to the start of the current sentence.
`)1 cursor to the end of the current sentence1 cursor to the end of the current sentence.
`<1 cursor to the start of the highlighted area1 cursor to the start of the highlighted area.
`>1 cursor to the end of the highlighted area1 cursor to the end of the highlighted area.
`[1 cursor to the start of last operated text or start of putted text1 cursor to the start of last operated text or start of putted text.
`]1 cursor to the end of last operated text or end of putted text1 cursor to the end of last operated text or end of putted text.
"``"1 cursor to the position before latest jump1 cursor to the position before latest jump.
`{1 cursor to the start of the current paragraph1 cursor to the start of the current paragraph.
`}1 cursor to the end of the current paragraph1 cursor to the end of the current paragraph.
a2 append text after the cursor N times2 append text after the cursor N times.
b1 cursor N words backward1 cursor N words backward.
["x]c{motion}2 delete Nmove text [into register x] and start insert2 delete Nmove text [into register x] and start insert.
["x]cc2 delete N lines [into register x] and start insert2 delete N lines [into register x] and start insert.
["x]d{motion}2 delete Nmove text [into register x]2 delete Nmove text [into register x].
["x]dd2 delete N lines [into register x]2 delete N lines [into register x].
do2 same as ":diffget"2 same as ":diffget".
dp2 same as ":diffput"2 same as ":diffput".
e1 cursor forward to the end of word N1 cursor forward to the end of word N.
f{char}1 cursor to Nth occurrence of {char} to the right1 cursor to Nth occurrence of {char} to the right.
g{char}Extended commands, see belowExtended commands, see below.
h1 cursor N chars to the left1 cursor N chars to the left.
i2 insert text before the cursor N times2 insert text before the cursor N times.
j1 cursor N lines downward1 cursor N lines downward.
k1 cursor N lines upward1 cursor N lines upward.
l1 cursor N chars to the right1 cursor N chars to the right.
m{A-Za-z}Set mark {A-Za-z} at cursor positionSet mark {A-Za-z} at cursor position.
n1 repeat the latest '/' or '?' N times1 repeat the latest '/' or '?' N times.
o2 begin a new line below the cursor and insert text, repeat N times2 begin a new line below the cursor and insert text, repeat N times.
["x]p2 put the text [from register x] after the cursor N times2 put the text [from register x] after the cursor N times.
q{0-9a-zA-Z"}Record typed characters into named register {0-9a-zA-Z"} (uppercase to append)Record typed characters into named register {0-9a-zA-Z"} (uppercase to append).
q(while recording) stops recording(while recording) stops recording.
QPlace/remove a multicursor; with [count]: place at each search matchPlace/remove a multicursor; with [count]: place at each search match.
[count]q:Edit : command-line in command-line window, with [count]: switch toEdit : command-line in command-line window, with [count]: switch to.
q/Edit / command-line in command-line windowEdit / command-line in command-line window.
q?Edit ? command-line in command-line windowEdit ? command-line in command-line window.
r{char}2 replace N chars with {char}2 replace N chars with {char}.
["x]s2 (substitute) delete N characters [into register x] and start insert2 (substitute) delete N characters [into register x] and start insert.
t{char}1 cursor till before Nth occurrence of {char} to the right1 cursor till before Nth occurrence of {char} to the right.
u2 undo changes2 undo changes.
vStart charwise Visual modeStart charwise Visual mode.
w1 cursor N words forward1 cursor N words forward.
["x]x2 delete N characters under and after the cursor [into register x]2 delete N characters under and after the cursor [into register x].
["x]y{motion}Yank Nmove text [into register x]Yank Nmove text [into register x].
["x]yyYank N lines [into register x]Yank N lines [into register x].
z{char}Commands starting with 'z', see belowCommands starting with 'z', see below.
{1 cursor N paragraphs backward1 cursor N paragraphs backward.
|1 cursor to column N1 cursor to column N.
}1 cursor N paragraphs forward1 cursor N paragraphs forward.
~2 'tildeop' off: switch case of N characters under cursor and move the cursor N characters to the right2 'tildeop' off: switch case of N characters under cursor and move the cursor N characters to the right.
~{motion}'tildeop' on: switch case of Nmove text'tildeop' on: switch case of Nmove text.
<C-End>1 same as "G"1 same as "G".
<C-Home>1 same as "gg"1 same as "gg".
<C-Left>1 same as "b"1 same as "b".
<C-LeftMouse>Place a multicursor at mouse-clickPlace a multicursor at mouse-click.
<C-Right>1 same as "w"1 same as "w".
<C-RightMouse>Same as "CTRL-T"Same as "CTRL-T".
<C-Tab>Same as "g<Tab>"Same as "g<Tab>".
["x]Delete2 same as "x"2 same as "x".
{count}DeleteRemove the last digit from {count}Remove the last digit from {count}.
Down1 same as "j"1 same as "j".
End1 same as "$"1 same as "$".
<F1>Same as <Help>Same as <Help>.
<Help>Open a help windowOpen a help window.
Home1 same as "0"1 same as "0".
Insert2 same as "i"2 same as "i".
Left1 same as "h"1 same as "h".
<LeftMouse>1 move cursor to the mouse click position1 move cursor to the mouse click position.
<MiddleMouse>2 same as "gP" at the mouse click position2 same as "gP" at the mouse click position.
Page DownSame as CTRL-FSame as CTRL-F.
Page UpSame as CTRL-BSame as CTRL-B.
Right1 same as "l"1 same as "l".
<RightMouse>Start Visual mode, move cursor to the mouse click positionStart Visual mode, move cursor to the mouse click position.
<S-Down>1 same as CTRL-F1 same as CTRL-F.
<S-Left>1 same as "b"1 same as "b".
<S-LeftMouse>Same as "*" at the mouse click positionSame as "*" at the mouse click position.
<S-Right>1 same as "w"1 same as "w".
<S-RightMouse>Same as "#" at the mouse click positionSame as "#" at the mouse click position.
<S-Up>1 same as CTRL-B1 same as CTRL-B.
<Undo>2 same as "u"2 same as "u".
Up1 same as "k"1 same as "k".

Text objects (38)

ShortcutActionWhat it does
a"Double quoted stringDouble quoted string.
a'Single quoted stringSingle quoted string.
a(Same as abSame as ab.
a)Same as abSame as ab.
a<"a <>" from '<' to the matching '>'"a <>" from '<' to the matching '>'.
a>Same as a<Same as a<.
aB"a Block" from `[{` to `]}` (with brackets)"a Block" from `[{` to `]}` (with brackets).
aW"a WORD" (with white space)"a WORD" (with white space).
a["a []" from '[' to the matching ']'"a []" from '[' to the matching ']'.
a]Same as a[Same as a[.
a`String in backticksString in backticks.
ab"a block" from "[(" to "])" (with braces)"a block" from "[(" to "])" (with braces).
alAll lines (entire buffer)All lines (entire buffer).
ap"a paragraph" (with white space)"a paragraph" (with white space).
as"a sentence" (with white space)"a sentence" (with white space).
at"a tag block" (with white space)"a tag block" (with white space).
aw"a word" (with white space)"a word" (with white space).
a{Same as aBSame as aB.
a}Same as aBSame as aB.
i"Double quoted string without the quotesDouble quoted string without the quotes.
i'Single quoted string without the quotesSingle quoted string without the quotes.
i(Same as ibSame as ib.
i)Same as ibSame as ib.
i<"inner <>" from '<' to the matching '>'"inner <>" from '<' to the matching '>'.
i>Same as i<Same as i<.
iB"inner Block" from `[{` and `]}`"inner Block" from `[{` and `]}`.
iW"inner WORD""inner WORD".
i["inner []" from '[' to the matching ']'"inner []" from '[' to the matching ']'.
i]Same as i[Same as i[.
i`String in backticks without the backticksString in backticks without the backticks.
ib"inner block" from "[(" to "])""inner block" from "[(" to "])".
ilInner line (without surrounding whitespace)Inner line (without surrounding whitespace).
ip"inner paragraph""inner paragraph".
is"inner sentence""inner sentence".
it"inner tag block""inner tag block".
iw"inner word""inner word".
i{Same as iBSame as iB.
i}Same as iBSame as iB.

Window commands (Ctrl + W) (38)

ShortcutActionWhat it does
Ctrl + W +Increase current window height N linesIncrease current window height N lines.
Ctrl + W -Decrease current window height N linesDecrease current window height N lines.
Ctrl + W <Decrease current window width N columnsDecrease current window width N columns.
Ctrl + W =Make all windows the same height & widthMake all windows the same height & width.
Ctrl + W >Increase current window width N columnsIncrease current window width N columns.
Ctrl + W HMove current window to the far leftMove current window to the far left.
Ctrl + W JMove current window to the very bottomMove current window to the very bottom.
Ctrl + W KMove current window to the very topMove current window to the very top.
Ctrl + W LMove current window to the far rightMove current window to the far right.
Ctrl + W PGo to preview windowGo to preview window.
Ctrl + W RRotate windows upwards N timesRotate windows upwards N times.
Ctrl + W TMove current window to a new tabpageMove current window to a new tabpage.
Ctrl + W WGo to N previous window (wrap around)Go to N previous window (wrap around).
Ctrl + W ]Split window and jump to tag under cursorSplit window and jump to tag under cursor.
Ctrl + W ^Split current window and edit alternate file NSplit current window and edit alternate file N.
Ctrl + W _Set current window height to N (default: very high)Set current window height to N (default: very high).
Ctrl + W bGo to bottom windowGo to bottom window.
Ctrl + W cClose current window (like )Close current window (like ).
Ctrl + W dSplit window and jump to definition under the cursorSplit window and jump to definition under the cursor.
Ctrl + W fSplit window and edit file name under the cursorSplit window and edit file name under the cursor.
Ctrl + W hGo to Nth left window (stop at first window)Go to Nth left window (stop at first window).
Ctrl + W iSplit window and jump to declaration of identifier under the cursorSplit window and jump to declaration of identifier under the cursor.
Ctrl + W jGo N windows down (stop at last window)Go N windows down (stop at last window).
Ctrl + W kGo N windows up (stop at first window)Go N windows up (stop at first window).
Ctrl + W lGo to Nth right window (stop at last window)Go to Nth right window (stop at last window).
Ctrl + W nOpen new window, N lines highOpen new window, N lines high.
Ctrl + W oClose all but current window (like )Close all but current window (like ).
Ctrl + W pGo to previous (last accessed) windowGo to previous (last accessed) window.
Ctrl + W qQuit current window (like )Quit current window (like ).
Ctrl + W rRotate windows downwards N timesRotate windows downwards N times.
Ctrl + W sSplit current window in two parts, new window N lines highSplit current window in two parts, new window N lines high.
Ctrl + W tGo to top windowGo to top window.
Ctrl + W vSplit current window vertically, new window N columns wideSplit current window vertically, new window N columns wide.
Ctrl + W wGo to N next window (wrap around)Go to N next window (wrap around).
Ctrl + W xExchange current window with window N (default: next window)Exchange current window with window N (default: next window).
Ctrl + W zClose preview windowClose preview window.
Ctrl + W |Set window width to N columnsSet window width to N columns.
Ctrl + W }Show tag under cursor in preview windowShow tag under cursor in preview window.

g commands (1)

ShortcutActionWhat it does
gg1 cursor to line N, default first line1 cursor to line N, default first line.

z commands (folds & scrolling) (50)

ShortcutActionWhat it does
zEnterRedraw, cursor line to top of window, cursor on first non-blankRedraw, cursor line to top of window, cursor on first non-blank.
z{height}EnterRedraw, make window {height} lines highRedraw, make window {height} lines high.
z+Cursor on line N (default line below window), otherwise like "z<CR>"Cursor on line N (default line below window), otherwise like "z<CR>".
z-Redraw, cursor line at bottom of window, cursor on first non-blankRedraw, cursor line at bottom of window, cursor on first non-blank.
z.Redraw, cursor line to center of window, cursor on first non-blankRedraw, cursor line to center of window, cursor on first non-blank.
z=Give spelling suggestionsGive spelling suggestions.
zAOpen a closed fold or close an open fold recursivelyOpen a closed fold or close an open fold recursively.
zCClose folds recursivelyClose folds recursively.
zDDelete folds recursivelyDelete folds recursively.
zEEliminate all foldsEliminate all folds.
zFCreate a fold for N linesCreate a fold for N lines.
zGTemporarily mark word as correctly spelledTemporarily mark word as correctly spelled.
zHWhen 'wrap' off scroll half a screenwidth to the rightWhen 'wrap' off scroll half a screenwidth to the right.
zLWhen 'wrap' off scroll half a screenwidth to the leftWhen 'wrap' off scroll half a screenwidth to the left.
zMSet 'foldlevel' to zeroSet 'foldlevel' to zero.
zNSet 'foldenable'Set 'foldenable'.
zOOpen folds recursivelyOpen folds recursively.
zRSet 'foldlevel' to the deepest foldSet 'foldlevel' to the deepest fold.
zWTemporarily mark word as incorrectly spelledTemporarily mark word as incorrectly spelled.
zXRe-apply 'foldlevel'Re-apply 'foldlevel'.
z^Cursor on line N (default line above window), otherwise like "z-"Cursor on line N (default line above window), otherwise like "z-".
zaOpen a closed fold, close an open foldOpen a closed fold, close an open fold.
zbRedraw, cursor line at bottom of windowRedraw, cursor line at bottom of window.
zcClose a foldClose a fold.
zdDelete a foldDelete a fold.
zeWhen 'wrap' off scroll horizontally to position the cursor at the end (right side) of the screenWhen 'wrap' off scroll horizontally to position the cursor at the end (right side) of the screen.
zf{motion}Create a fold for Nmove textCreate a fold for Nmove text.
zgPermanently mark word as correctly spelledPermanently mark word as correctly spelled.
zhWhen 'wrap' off scroll screen N characters to the rightWhen 'wrap' off scroll screen N characters to the right.
ziToggle 'foldenable'Toggle 'foldenable'.
zj1 move to the start of the next fold1 move to the start of the next fold.
zk1 move to the end of the previous fold1 move to the end of the previous fold.
zlWhen 'wrap' off scroll screen N characters to the leftWhen 'wrap' off scroll screen N characters to the left.
zmSubtract one from 'foldlevel'Subtract one from 'foldlevel'.
znReset 'foldenable'Reset 'foldenable'.
zoOpen foldOpen fold.
zpPaste in block-mode without trailing spacesPaste in block-mode without trailing spaces.
zPPaste in block-mode without trailing spacesPaste in block-mode without trailing spaces.
zrAdd one to 'foldlevel'Add one to 'foldlevel'.
zsWhen 'wrap' off scroll horizontally to position the cursor at the start (left side) of the screenWhen 'wrap' off scroll horizontally to position the cursor at the start (left side) of the screen.
ztRedraw, cursor line at top of windowRedraw, cursor line at top of window.
zuwUndoUndo.
zugUndoUndo.
zuWUndoUndo.
zuGUndoUndo.
zvOpen enough folds to view the cursor lineOpen enough folds to view the cursor line.
zwPermanently mark word as incorrectly spelledPermanently mark word as incorrectly spelled.
zxRe-apply 'foldlevel' and do "zv"Re-apply 'foldlevel' and do "zv".
zyYank without trailing spacesYank without trailing spaces.
zzRedraw, cursor line at center of windowRedraw, cursor line at center of window.

[ and ] commands (48)

ShortcutActionWhat it does
[ Ctrl + DJump to first #define found in current and included files matching the word under the cursor, start searching at beginning of current fileJump to first #define found in current and included files matching the word under the cursor, start searching at beginning of current file.
[ Ctrl + IJump to first line in current and included files that contains the word under the cursor, start searching at beginning of current fileJump to first line in current and included files that contains the word under the cursor, start searching at beginning of current file.
[#1 cursor to N previous unmatched #if, #else or #ifdef1 cursor to N previous unmatched #if, #else or #ifdef.
['1 cursor to previous lowercase mark, on first non-blank1 cursor to previous lowercase mark, on first non-blank.
[(1 cursor N times back to unmatched '('1 cursor N times back to unmatched '('.
[*1 same as "[/"1 same as "[/".
[`1 cursor to previous lowercase mark1 cursor to previous lowercase mark.
[/1 cursor to N previous start of a C comment1 cursor to N previous start of a C comment.
[C1 jump to N previous multicursor1 jump to N previous multicursor.
[DList all defines found in current and included files matching the word under the cursor, start searching at beginning of current fileList all defines found in current and included files matching the word under the cursor, start searching at beginning of current file.
[IList all lines found in current and included files that contain the word under the cursor, start searching at beginning of current fileList all lines found in current and included files that contain the word under the cursor, start searching at beginning of current file.
[P2 same as "[p"2 same as "[p".
[[1 cursor N sections backward1 cursor N sections backward.
[]1 cursor N SECTIONS backward1 cursor N SECTIONS backward.
[c1 cursor N times backwards to start of change1 cursor N times backwards to start of change.
[dShow first #define found in current and included files matching the word under the cursor, start searching at beginning of current fileShow first #define found in current and included files matching the word under the cursor, start searching at beginning of current file.
[iShow first line found in current and included files that contains the word under the cursor, start searching at beginning of current fileShow first line found in current and included files that contains the word under the cursor, start searching at beginning of current file.
[m1 cursor N times back to start of member function1 cursor N times back to start of member function.
[p2 like "P", but adjust indent to current line2 like "P", but adjust indent to current line.
[s1 move to the previous misspelled word1 move to the previous misspelled word.
[z1 move to start of open fold1 move to start of open fold.
[{1 cursor N times back to unmatched '{'1 cursor N times back to unmatched '{'.
[<MiddleMouse>2 same as "[p"2 same as "[p".
] Ctrl + DJump to first #define found in current and included files matching the word under the cursor, start searching at cursor positionJump to first #define found in current and included files matching the word under the cursor, start searching at cursor position.
] Ctrl + IJump to first line in current and included files that contains the word under the cursor, start searching at cursor positionJump to first line in current and included files that contains the word under the cursor, start searching at cursor position.
]#1 cursor to N next unmatched #endif or #else1 cursor to N next unmatched #endif or #else.
]'1 cursor to next lowercase mark, on first non-blank1 cursor to next lowercase mark, on first non-blank.
])1 cursor N times forward to unmatched ')'1 cursor N times forward to unmatched ')'.
]*1 same as "]/"1 same as "]/".
]`1 cursor to next lowercase mark1 cursor to next lowercase mark.
]/1 cursor to N next end of a C comment1 cursor to N next end of a C comment.
]C1 jump to N next multicursor1 jump to N next multicursor.
]DList all #defines found in current and included files matching the word under the cursor, start searching at cursor positionList all #defines found in current and included files matching the word under the cursor, start searching at cursor position.
]IList all lines found in current and included files that contain the word under the cursor, start searching at cursor positionList all lines found in current and included files that contain the word under the cursor, start searching at cursor position.
]P2 same as "[p"2 same as "[p".
][1 cursor N SECTIONS forward1 cursor N SECTIONS forward.
]]1 cursor N sections forward1 cursor N sections forward.
]c1 cursor N times forward to start of change1 cursor N times forward to start of change.
]dShow first #define found in current and included files matching the word under the cursor, start searching at cursor positionShow first #define found in current and included files matching the word under the cursor, start searching at cursor position.
]iShow first line found in current and included files that contains the word under the cursor, start searching at cursor positionShow first line found in current and included files that contains the word under the cursor, start searching at cursor position.
]m1 cursor N times forward to end of member function1 cursor N times forward to end of member function.
]p2 like "p", but adjust indent to current line2 like "p", but adjust indent to current line.
]s1 move to next misspelled word1 move to next misspelled word.
]z1 move to end of open fold1 move to end of open fold.
]}1 cursor N times forward to unmatched '}'1 cursor N times forward to unmatched '}'.
]<MiddleMouse>2 same as "]p"2 same as "]p".
["x]gP2 put the text [from register x] before the cursor N times, leave the cursor after it2 put the text [from register x] before the cursor N times, leave the cursor after it.
["x]gp2 put the text [from register x] after the cursor N times, leave the cursor after it2 put the text [from register x] after the cursor N times, leave the cursor after it.

Operator-pending mode (3)

ShortcutActionWhat it does
vForce operator to work charwiseForce operator to work charwise.
VForce operator to work linewiseForce operator to work linewise.
Ctrl + VForce operator to work blockwiseForce operator to work blockwise.

Visual mode (85)

ShortcutActionWhat it does
Ctrl + \ Ctrl + NStop Visual modeStop Visual mode.
Ctrl + \ Ctrl + GGo to Normal modeGo to Normal mode.
Ctrl + A2 add N to number in highlighted text2 add N to number in highlighted text.
Ctrl + CStop Visual modeStop Visual mode.
Ctrl + GToggle between Visual mode and Select modeToggle between Visual mode and Select mode.
Backspace2 Select mode: delete highlighted area2 Select mode: delete highlighted area.
Ctrl + H2 same as <BS>2 same as <BS>.
Ctrl + OSwitch from Select to Visual mode for one commandSwitch from Select to Visual mode for one command.
Ctrl + VMake Visual mode blockwise or stop Visual modeMake Visual mode blockwise or stop Visual mode.
Ctrl + X2 subtract N from number in highlighted text2 subtract N from number in highlighted text.
EscStop Visual modeStop Visual mode.
Ctrl + ]Jump to highlighted tagJump to highlighted tag.
!{filter}2 filter the highlighted lines through the external command {filter}2 filter the highlighted lines through the external command {filter}.
:Start a command-line with the highlighted lines as a rangeStart a command-line with the highlighted lines as a range.
<2 shift the highlighted lines one 'shiftwidth' left2 shift the highlighted lines one 'shiftwidth' left.
=2 filter the highlighted lines through the external program given with the 'equalprg' option2 filter the highlighted lines through the external program given with the 'equalprg' option.
>2 shift the highlighted lines one 'shiftwidth' right2 shift the highlighted lines one 'shiftwidth' right.
A2 block mode: append same text in all lines, after the highlighted area2 block mode: append same text in all lines, after the highlighted area.
C2 delete the highlighted lines and start insert2 delete the highlighted lines and start insert.
D2 delete the highlighted lines2 delete the highlighted lines.
I2 block mode: insert same text in all lines, before the highlighted area2 block mode: insert same text in all lines, before the highlighted area.
J2 join the highlighted lines2 join the highlighted lines.
KRun 'keywordprg' on the highlighted areaRun 'keywordprg' on the highlighted area.
OMove horizontally to other corner of areaMove horizontally to other corner of area.
PReplace highlighted area with register contents; registers are unchangedReplace highlighted area with register contents; registers are unchanged.
R2 delete the highlighted lines and start insert2 delete the highlighted lines and start insert.
S2 delete the highlighted lines and start insert2 delete the highlighted lines and start insert.
U2 make highlighted area uppercase2 make highlighted area uppercase.
VMake Visual mode linewise or stop Visual modeMake Visual mode linewise or stop Visual mode.
X2 delete the highlighted lines2 delete the highlighted lines.
YYank the highlighted linesYank the highlighted lines.
a"Extend highlighted area with a double quoted stringExtend highlighted area with a double quoted string.
a'Extend highlighted area with a single quoted stringExtend highlighted area with a single quoted string.
a(Same as abSame as ab.
a)Same as abSame as ab.
a<Extend highlighted area with a <> blockExtend highlighted area with a <> block.
a>Same as a<Same as a<.
aBExtend highlighted area with a {} blockExtend highlighted area with a {} block.
aWExtend highlighted area with "a WORD"Extend highlighted area with "a WORD".
a[Extend highlighted area with a [] blockExtend highlighted area with a [] block.
a]Same as a[Same as a[.
a`Extend highlighted area with a backtick quoted stringExtend highlighted area with a backtick quoted string.
abExtend highlighted area with a () blockExtend highlighted area with a () block.
alExtend highlighted area to all linesExtend highlighted area to all lines.
apExtend highlighted area with a paragraphExtend highlighted area with a paragraph.
asExtend highlighted area with a sentenceExtend highlighted area with a sentence.
atExtend highlighted area with a tag blockExtend highlighted area with a tag block.
awExtend highlighted area with "a word"Extend highlighted area with "a word".
a{Same as aBSame as aB.
a}Same as aBSame as aB.
c2 delete highlighted area and start insert2 delete highlighted area and start insert.
d2 delete highlighted area2 delete highlighted area.
g Ctrl + A2 add N to number in highlighted text2 add N to number in highlighted text.
g Ctrl + X2 subtract N from number in highlighted text2 subtract N from number in highlighted text.
gJ2 join the highlighted lines without inserting spaces2 join the highlighted lines without inserting spaces.
gq2 format the highlighted lines2 format the highlighted lines.
gvExchange current and previous highlighted areaExchange current and previous highlighted area.
i"Extend highlighted area with a double quoted string (without quotes)Extend highlighted area with a double quoted string (without quotes).
i'Extend highlighted area with a single quoted string (without quotes)Extend highlighted area with a single quoted string (without quotes).
i(Same as ibSame as ib.
i)Same as ibSame as ib.
i<Extend highlighted area with inner <> blockExtend highlighted area with inner <> block.
i>Same as i<Same as i<.
iBExtend highlighted area with inner {} blockExtend highlighted area with inner {} block.
iWExtend highlighted area with "inner WORD"Extend highlighted area with "inner WORD".
i[Extend highlighted area with inner [] blockExtend highlighted area with inner [] block.
i]Same as i[Same as i[.
i`Extend highlighted area with a backtick quoted string (without the backticks)Extend highlighted area with a backtick quoted string (without the backticks).
ibExtend highlighted area with inner () blockExtend highlighted area with inner () block.
ilSelect inner line under cursorSelect inner line under cursor.
ipExtend highlighted area with inner paragraphExtend highlighted area with inner paragraph.
isExtend highlighted area with inner sentenceExtend highlighted area with inner sentence.
itExtend highlighted area with inner tag blockExtend highlighted area with inner tag block.
iwExtend highlighted area with "inner word"Extend highlighted area with "inner word".
i{Same as iBSame as iB.
i}Same as iBSame as iB.
oMove cursor to other corner of areaMove cursor to other corner of area.
pReplace highlighted area with register contents; deleted text in unnamed registerReplace highlighted area with register contents; deleted text in unnamed register.
r2 replace highlighted area with a character2 replace highlighted area with a character.
s2 delete highlighted area and start insert2 delete highlighted area and start insert.
u2 make highlighted area lowercase2 make highlighted area lowercase.
vMake Visual mode charwise or stop Visual modeMake Visual mode charwise or stop Visual mode.
x2 delete the highlighted area2 delete the highlighted area.
yYank the highlighted areaYank the highlighted area.
~2 swap case for the highlighted area2 swap case for the highlighted area.

Command-line editing (46)

ShortcutActionWhat it does
Ctrl + ADo completion on the pattern in front of the cursor and insert all matchesDo completion on the pattern in front of the cursor and insert all matches.
Ctrl + BCursor to begin of command-lineCursor to begin of command-line.
Ctrl + CSame as <Esc>Same as <Esc>.
Ctrl + DList completions that match the pattern in front of the cursorList completions that match the pattern in front of the cursor.
Ctrl + GNext match when 'incsearch' is activeNext match when 'incsearch' is active.
BackspaceDelete the character in front of the cursor enter digraph when 'digraph' is onDelete the character in front of the cursor enter digraph when 'digraph' is on.
Ctrl + HSame as <BS>Same as <BS>.
TabIf 'wildchar' is <Tab>: Do completion on the pattern in front of the cursorIf 'wildchar' is <Tab>: Do completion on the pattern in front of the cursor.
<S-Tab>Same as CTRL-PSame as CTRL-P.
'wildchar'Do completion on the pattern in front of the cursor (default: <Tab>)Do completion on the pattern in front of the cursor (default: <Tab>).
Ctrl + ISame as <Tab>Same as <Tab>.
<NL>Same as <CR>Same as <CR>.
Ctrl + JSame as <CR> enter digraphSame as <CR> enter digraph.
Ctrl + LDo completion on the pattern in front of the cursor and insert the longest common partDo completion on the pattern in front of the cursor and insert the longest common part.
EnterExecute entered commandExecute entered command.
Ctrl + MSame as <CR>Same as <CR>.
Ctrl + NAfter using 'wildchar' with multiple matches: go to next match, otherwise: recall older command-line from historyAfter using 'wildchar' with multiple matches: go to next match, otherwise: recall older command-line from history.
Ctrl + PAfter using 'wildchar' with multiple matches: go to previous match, otherwise: recall older command-line from historyAfter using 'wildchar' with multiple matches: go to previous match, otherwise: recall older command-line from history.
Ctrl + QSame as CTRL-V, unless it's used for terminal control flowSame as CTRL-V, unless it's used for terminal control flow.
Ctrl + TPrevious match when 'incsearch' is activePrevious match when 'incsearch' is active.
Ctrl + URemove all characters between the cursor and beginning of command-lineRemove all characters between the cursor and beginning of command-line.
Ctrl + VInsert next non-digit literally, insert three digit decimal number as a single byteInsert next non-digit literally, insert three digit decimal number as a single byte.
Ctrl + WDelete the word in front of the cursorDelete the word in front of the cursor.
EscAbandon command-line without executing itAbandon command-line without executing it.
Ctrl + [Same as <Esc>Same as <Esc>.
Ctrl + \ Ctrl + NGo to Normal mode, abandon command-lineGo to Normal mode, abandon command-line.
Ctrl + \ Ctrl + GGo to Normal mode, abandon command-line {expr}Go to Normal mode, abandon command-line {expr}.
Ctrl + ]Trigger abbreviationTrigger abbreviation.
Ctrl + ^Toggle use of mappingsToggle use of mappings.
DeleteDelete the character under the cursorDelete the character under the cursor.
LeftCursor leftCursor left.
<S-Left>Cursor one word leftCursor one word left.
<C-Left>Cursor one word leftCursor one word left.
RightCursor rightCursor right.
<S-Right>Cursor one word rightCursor one word right.
<C-Right>Cursor one word rightCursor one word right.
UpRecall previous command-line from history that matches pattern in front of the cursorRecall previous command-line from history that matches pattern in front of the cursor.
<S-Up>Recall previous command-line from historyRecall previous command-line from history.
DownRecall next command-line from history that matches pattern in front of the cursorRecall next command-line from history that matches pattern in front of the cursor.
<S-Down>Recall next command-line from historyRecall next command-line from history.
HomeCursor to start of command-lineCursor to start of command-line.
EndCursor to end of command-lineCursor to end of command-line.
Page DownSame as <S-Down>Same as <S-Down>.
Page UpSame as <S-Up>Same as <S-Up>.
InsertToggle insert/overstrike modeToggle insert/overstrike mode.
<LeftMouse>Cursor at mouse clickCursor at mouse click.
📜 Source: Neovim documentation — :help index (runtime/doc/index.txt). The Neovim :help index, mode by mode: Insert, Normal, text objects, window and g/z/bracket commands, Visual and command-line editing. Ex (colon) commands and CTRL-W CTRL-x aliases are omitted; CTRL-X is written Ctrl + X. Checked 2026-09-06. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Frequently Asked Questions

What are the most useful Neovim / Vim keyboard shortcuts?

The most essential Neovim / Vim shortcuts are: i (Insert mode), Esc (Normal mode), v (Visual mode).

What is the Neovim / Vim shortcut for insert mode?

The Neovim / Vim shortcut for insert mode is i.

What's the fastest way to learn all Neovim / Vim shortcuts?

Print the Neovim / Vim cheat sheet and keep it next to your keyboard for the first week, then switch to active recall: open Shortcut Speedrun and practice Neovim / Vim shortcuts against the clock until they're automatic.

Can I combine Neovim / Vim shortcuts with other tools?

Yes — use My Stack to combine Neovim / Vim shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.

Related Shortcut Pages

VS Code Jupyter Notebook PyCharm Xcode WebStorm JetBrains Rider

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Modes

Neovim starts in Normal mode, where keys are commands. i enters Insert mode to type text, and Esc returns to Normal — when keys seem to do nothing, Esc first, then retry. v starts a Visual selection by character and V by line; in Visual mode the same edit keys (d, y, >) act on the selection. Command-line mode begins with : and is where files are saved and the editor is quit.

Editing

dd deletes the current line and yy yanks (copies) it; p puts the deleted or yanked text after the cursor. Because these are operators, a count multiplies them — 3dd deletes three lines — and motions combine with them (dw, d$). u undoes and Ctrl + R redoes, without limit.

Search and replace

/[pattern] searches forward from the cursor, with n and N for the next and previous match. :%s/old/new/g replaces every occurrence in the file — % is the whole file, g means all matches on each line, and adding c asks before each change. :w saves, :q quits and :wq does both.

🤖 Ask AI about Neovim / Vim shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok