Neovim Cheatsheet

0.10

The essential Neovim shortcuts and commands you'll actually use

Official docs →

Neovim is a modern, extensible text editor built on the bones of Vim. If you've ever watched someone fly through code without touching a mouse and thought "I want that," you're in the right place. Neovim keeps everything that made Vim legendary — modal editing, composable commands, a language for manipulating text — and adds first-class Lua scripting, built-in LSP support, and an ecosystem of plugins that make it feel like a full IDE.

The learning curve is real. There's no getting around it. Your first week will feel slower than whatever editor you came from, and you'll probably quit back to VS Code at least once. That's normal. The key insight is that Neovim isn't about memorizing hundreds of shortcuts — it's about learning a small grammar of motions and operators that combine together. Once d (delete) + w (word) clicks as "delete word," you'll realize c (change) + w works too, and y (yank) + w, and suddenly you're not memorizing shortcuts anymore. You're speaking a language.

This cheatsheet covers what you'll actually reach for day to day. It's not exhaustive — the official docs are the real reference — but it should get you productive and help you build the muscle memory that makes Neovim worth it. We've included common LSP and Telescope bindings because most modern Neovim setups use them, but your specific keymaps may vary depending on your config. When in doubt, :map shows you what's bound where.

Modes

Neovim's power comes from its modal design. You're always in one of these modes, and knowing how to move between them is the foundation of everything else.

Switching Modes
Esc
Return to Normal mode from any mode
i
Insert before cursor
a
Insert after cursor (append)
I
Insert at beginning of line
A
Insert at end of line
o
Open new line below and enter Insert mode
O
Open new line above and enter Insert mode
v
Enter Visual mode (character selection)
V
Enter Visual Line mode (select whole lines)
Ctrl-v
Enter Visual Block mode (column selection)
:
Enter Command-line mode
R
Enter Replace mode (overwrite characters)

If you keep hitting Esc and nothing happens, you might be in a terminal buffer. Try Ctrl-\ then Ctrl-n to get back to Normal mode.

Navigation & Motions

Motions are half of Neovim's composable grammar. Learn these and you can combine them with any operator.

Basic Movement
hjkl
Left / down / up / right
w
Jump to start of next word
b
Jump to start of previous word
e
Jump to end of current/next word
WBE
Same as w/b/e but skip punctuation (WORD-wise)
Line Movement
0
Jump to start of line
^
Jump to first non-blank character
$
Jump to end of line
f{char}
Jump forward to {char} on current line
F{char}
Jump backward to {char} on current line
t{char}
Jump to just before {char} forward
T{char}
Jump to just after {char} backward
;
Repeat last f/F/t/T forward
,
Repeat last f/F/t/T backward
File & Screen Movement
gg
Go to first line of file
G
Go to last line of file
{number}G
Go to line {number}
%
Jump to matching bracket
Ctrl-d
Scroll down half a page
Ctrl-u
Scroll up half a page
Ctrl-f
Scroll down a full page
Ctrl-b
Scroll up a full page
zz
Center current line on screen
zt
Move current line to top of screen
zb
Move current line to bottom of screen
{
Jump to previous blank line (paragraph up)
}
Jump to next blank line (paragraph down)

f and t are sleeper hits. Instead of mashing w five times, try f( to jump straight to the next parenthesis. Once this clicks, you'll wonder how you lived without it.

Editing Operators

Operators combine with motions to form commands. This is the real superpower: learn a few operators and a few motions, and you can do dozens of things.

Core Operators
d{motion}
Delete (cut) text covered by motion
c{motion}
Change — delete text and enter Insert mode
y{motion}
Yank (copy) text covered by motion
>{motion}
Indent right
<{motion}
Indent left
={motion}
Auto-indent / reformat
gu{motion}
Lowercase text
gU{motion}
Uppercase text
Common Combos
dd
Delete entire line
cc
Change entire line
yy
Yank entire line
D
Delete from cursor to end of line
C
Change from cursor to end of line
x
Delete character under cursor
s
Delete character and enter Insert mode
r{char}
Replace character under cursor with {char}
J
Join current line with line below
~
Toggle case of character under cursor
Text Objects (use with operators)
iw
Inner word (just the word, no surrounding space)
aw
A word (word plus surrounding space)
i"
Inside double quotes
i'
Inside single quotes
i)
Inside parentheses
i}
Inside curly braces
i]
Inside square brackets
it
Inside HTML/XML tag
ip
Inner paragraph

ci" (change inside quotes) is probably the combo you'll use most. Cursor anywhere inside a quoted string? ci" clears the contents and drops you into Insert mode. Works with parentheses (ci(), braces (ci{), brackets (ci[), and tags (cit).

Undo, Redo & Registers

Undo & Repeat
u
Undo last change
Ctrl-r
Redo
.
Repeat last change — incredibly powerful
Registers & Clipboard
p
Paste after cursor
P
Paste before cursor
"{reg}y{motion}
Yank into register {reg}
"{reg}p
Paste from register {reg}
"+y{motion}
Yank to system clipboard
"+p
Paste from system clipboard
:reg
Show contents of all registers

The . (dot) command repeats your last change. Make an edit once, then move to the next spot and hit . to apply it again. This is one of Vim's most underappreciated features and it makes repetitive edits almost effortless.

Search & Replace

Search
/{pattern}
Search forward
?{pattern}
Search backward
n
Jump to next match
N
Jump to previous match
*
Search forward for word under cursor
#
Search backward for word under cursor
:noh
Clear search highlighting
Substitution (Find & Replace)
:s/old/new/
Replace first occurrence on current line
:s/old/new/g
Replace all occurrences on current line
:%s/old/new/g
Replace all occurrences in file
:%s/old/new/gc
Replace all in file with confirmation
:'<,'>s/old/new/g
Replace in visual selection

Windows & Splits

Creating Splits
Ctrl-wv
Split window vertically
Ctrl-ws
Split window horizontally
:vsp {file}
Vertical split and open file
:sp {file}
Horizontal split and open file
Navigating Splits
Ctrl-wh
Move to left split
Ctrl-wj
Move to split below
Ctrl-wk
Move to split above
Ctrl-wl
Move to right split
Ctrl-ww
Cycle through splits
Resizing & Managing Splits
Ctrl-w=
Make all splits equal size
Ctrl-w_
Maximize current split height
Ctrl-w|
Maximize current split width
Ctrl-wo
Close all splits except current
Ctrl-wq
Close current split
Ctrl-wT
Move current split to new tab

Buffers & Tabs

Buffers are how Neovim tracks open files. Every file you open is a buffer, even if you can't see it. Tabs in Neovim are more like "layouts" than browser tabs — each tab can hold its own arrangement of splits.

Buffers
:ls
List open buffers
:b {name}
Switch to buffer by partial name (tab-complete works)
:b {number}
Switch to buffer by number
:bn
Next buffer
:bp
Previous buffer
:bd
Close current buffer
:e {file}
Open file in new buffer
Tabs
:tabnew
Open new tab
:tabnew {file}
Open file in new tab
gt
Go to next tab
gT
Go to previous tab
{number}gt
Go to tab {number}
:tabclose
Close current tab

Marks & Jumps

Marks let you bookmark positions in a file and jump back to them. Lowercase marks are local to a file, uppercase marks work across files.

Marks
m{a-z}
Set a local mark
m{A-Z}
Set a global mark (works across files)
'{a-z}
Jump to line of mark
`{a-z}
Jump to exact position of mark
:marks
List all marks
Jump List
Ctrl-o
Jump to previous position in jump list
Ctrl-i
Jump to next position in jump list
gd
Go to local definition of word under cursor
gD
Go to global definition of word under cursor
gf
Go to file under cursor
:jumps
Show jump list

Ctrl-o is your "back button." Every time you jump somewhere — search, goto definition, switching files — Neovim remembers where you were. Hit Ctrl-o to retrace your steps. It works across files. This alone will save you from getting lost.

Macros

Macros record a sequence of keystrokes and replay them. They're perfect for repetitive edits that are too complex for . but not worth writing a script for.

Recording & Playing Macros
q{a-z}
Start recording macro into register {a-z}
q
Stop recording (press while recording)
@{a-z}
Play macro from register
@@
Replay last played macro
{n}@{a-z}
Play macro {n} times

When recording a macro, start with 0 or ^ to move to a consistent position on the line, and end with j to move down. That way you can run it across multiple lines with something like 10@q and it'll work reliably.

LSP (Language Server Protocol)

Neovim has built-in LSP support since version 0.5. These are common default bindings, but your specific config might remap them. Check with :map or look at your lspconfig setup.

LSP Navigation
gd
Go to definition
gD
Go to declaration
gr
Show references
gi
Go to implementation
K
Hover documentation
Ctrl-k
Signature help (in Insert mode)
LSP Actions
<leader>rn
Rename symbol under cursor
<leader>ca
Code action (quick fixes, refactors)
<leader>f
Format buffer
]d
Go to next diagnostic
[d
Go to previous diagnostic
<leader>e
Show diagnostic float
<leader>q
Send diagnostics to location list

Telescope

Telescope is the fuzzy finder that most modern Neovim setups rely on. These are the typical <leader> bindings — yours might differ based on your config. If you're not using Telescope yet, it's the single plugin most worth installing.

Finding Things
<leader>ff
Find files by name
<leader>fg
Live grep (search file contents)
<leader>fb
Browse open buffers
<leader>fh
Search help tags
<leader>fo
Recently opened files
<leader>fw
Search for word under cursor
Inside Telescope
Ctrl-nCtrl-p
Move up/down in results (or arrow keys)
Enter
Open selected result
Ctrl-x
Open in horizontal split
Ctrl-v
Open in vertical split
Ctrl-t
Open in new tab
Esc
Close Telescope

Essential Commands

File Operations
:w
Save file
:q
Quit (fails if unsaved changes)
:wq
Save and quit
:q!
Quit without saving
:wa
Save all open buffers
:qa
Quit all
ZZ
Save and quit (Normal mode shortcut)
ZQ
Quit without saving (Normal mode shortcut)
Useful Commands
:set number
Show line numbers
:set relativenumber
Show relative line numbers
:!{cmd}
Run shell command
:r !{cmd}
Insert output of shell command into buffer
:map
Show all key mappings
:checkhealth
Diagnose your Neovim setup

Tips & Tricks

Relative line numbers (set relativenumber) are a game-changer for vertical motions. Instead of guessing "is that 15 lines down?", you can see the number right there and type 15j. Most people set both number and relativenumber so the current line shows its absolute number while everything else is relative.

Visual Block mode (Ctrl-v) lets you edit columns. Select a vertical column, press I, type your text, and hit Esc — the text appears on every selected line. This is incredibly handy for adding prefixes, aligning code, or editing structured text.

You don't need to memorize every shortcut on this page. Start with hjkl, w/b, dd, yy, p, i, Esc, and :wq. Use those for a week. Then add ciw, f{char}, and Ctrl-d/Ctrl-u. Build up gradually — that's how everyone who's good at Vim actually learned it.

Run :checkhealth after setting up your config. It tells you exactly what's working, what's broken, and what's missing. It's the first command to run when something feels off.

The gx command in Normal mode opens the URL under your cursor in your browser. Handy when you're reading code with links in comments.

Related Tools