■ Modes at a Glance
enter with
NORMAL
Esc from anywhere
enter with
INSERT
i a o I A O
enter with
VISUAL
v V Ctrl+v
enter with
COMMAND
: or / or ?
■ Normal Mode Reference
hjkl← ↓ ↑ → (also arrow keys)
0Start of line
^First non-blank char
$End of line
g_Last non-blank char
fcJump TO char c on line
FcJump TO char c backwards
tcJump BEFORE char c
TcJump BEFORE char c bwd
; / ,Repeat f/t forward / backward
%Jump to matching bracket
wNext word start
WNext WORD start (whitespace)
bPrev word start
BPrev WORD start
eWord end forward
EWORD end forward
geWord end backward
gEWORD end backward
ggTop of file
GBottom of file
{n}GGo to line n
:{n}Go to line n (command)
HTop of visible screen
MMiddle of visible screen
LBottom of visible screen
Ctrl+dScroll down ½ page
Ctrl+uScroll up ½ page
Ctrl+fScroll full page down
Ctrl+bScroll full page up
zzCenter cursor on screen
ztCursor to top of screen
zbCursor to bottom of screen
Ctrl+oJump to older position
Ctrl+iJump to newer position
🖉 Entering Insert Mode
iInsert before cursor
IInsert at first non-blank
aAppend after cursor
AAppend at end of line
oOpen new line below, insert
OOpen new line above, insert
sDelete char, insert
SDelete line, insert
CChange to end of line
REnter Replace mode (overtype)
EscReturn to Normal mode
Ctrl+r regPaste register in Insert mode
Ctrl+wDelete prev word (Insert)
Ctrl+uDelete to line start (Insert)
✎ Operators + Motions

Combine operator + motion: d+w = delete word. Double = whole line.

OpNameExample
dDelete (cut)dw d$ dd
yYank (copy)yw y3j yy
cChangecw c$ cc
>Indent →>> >j
<Indent ←<< <j
=Auto-indent== =G
guLowercaseguiw guu
gUUppercasegUiw gUU
g~Toggle caseg~iw
⊗ Single-Key Edits
xDelete char under cursor (fwd)
XDelete char before cursor (bwd)
rcReplace char with c
~Toggle case of char
JJoin line below to current
DDelete to end of line
pPaste after cursor / line
PPaste before cursor / line
"0pPaste last yank (not delete)
uUndo
Ctrl+rRedo
.Repeat last change
▩ Text Objects

i = inner  |  a = around (includes delimiter)

iw / awword
is / assentence
ip / apparagraph
i" / a"double-quoted string
i' / a'single-quoted string
i` / a`backtick string
i( / a(parentheses
i[ / a[brackets
i{ / a{braces (also iB/aB)
i< / a<angle brackets
it / atHTML/XML tag

Combine: ciw · da{ · yip · vat

▮ Visual Mode
vChar-wise visual
VLine-wise visual
Ctrl+vBlock visual (column)
gvReselect last selection
oMove to other end of selection
d / xDelete selection
yYank selection
cChange selection
> / <Indent / unindent
u / ULowercase / uppercase
~Toggle case
JJoin selected lines
:Enter command for range
/patSearch forward
?patSearch backward
n / NNext / prev match
*Search word under cursor (fwd)
#Search word under cursor (bwd)
:nohClear search highlights
:s/o/n/Replace first on line
:s/o/n/gReplace all on line
:%s/o/n/gReplace all in file
:%s/o/n/gcReplace with confirm
:'<,'>s/o/n/gReplace in selection
: Ex Commands
:wSave file
:w!Force save
:qQuit
:q!Quit without saving
:wq / :xSave and quit
:e fileOpen file
:e!Reload (discard changes)
:lsList buffers
:bn / :bpNext / prev buffer
:bdDelete buffer
:sp / :vspSplit horizontal / vertical
:tabnewNew tab
:help topicOpen help for topic
:!cmdRun shell command
:r !cmdInsert shell output
🆕 Marks & Registers
maSet local mark a
mASet global mark A
'aJump to mark a (line)
`aJump to mark a (exact)
''Jump to last jump location
:marksList all marks
"ayyYank into register a
"apPaste from register a
"0pPaste last yank
"+yCopy to system clipboard
"+pPaste from system clipboard
:regShow all registers
▶ Macros & Repeat
qaStart recording into register a
qStop recording
@aPlay macro from register a
@@Replay last macro
5@aPlay macro 5 times
:norm @aRun macro on selected lines
.Repeat last change
@:Repeat last Ex command
n.Repeat change n times
Ctrl+w sHorizontal split
Ctrl+w vVertical split
Ctrl+w hjklNavigate between splits
Ctrl+w HJKLMove split direction
Ctrl+w =Equalize split sizes
Ctrl+w _Maximize height
Ctrl+w |Maximize width
Ctrl+w qClose window
Ctrl+w oClose all other windows
gt / gTNext / prev tab
:tabnewNew tab
:tabcloseClose tab
⚡ LSP (Neovim built-in)
gdGo to definition
gDGo to declaration
grShow references
giGo to implementation
KHover documentation
<leader>rnRename symbol
<leader>caCode actions
[d / ]dPrev / next diagnostic
<leader>eShow diagnostic float
:LspInfoShow active LSP clients
:MasonInstall language servers
🤖 GitHub Copilot

Requires github/copilot.vim or zbirenbaum/copilot.lua

:Copilot setupAuthenticate with GitHub
:Copilot enableEnable Copilot
:Copilot disableDisable Copilot
:Copilot statusShow current status
:Copilot panelOpen suggestions panel
TabAccept suggestion
Ctrl+]Dismiss suggestion
Alt+]Next suggestion
Alt+[Previous suggestion
Ctrl+Alt+]Accept next word only
🤖 GitHub Copilot Setup
Option A — copilot.vim (official)
-- lazy.nvim
{ "github/copilot.vim" }
Then run :Copilot setup
Option B — copilot.lua (Lua, nvim-cmp)
-- lazy.nvim
{ "zbirenbaum/copilot.lua",
  opts = {
    suggestion = { auto_trigger = true },
  }
}
cmp integration (copilot.lua)
-- adds Copilot as a cmp source
{ "zbirenbaum/copilot-cmp",
  config = true
}
Then add "copilot" to cmp sources
Remap Tab (avoid conflicts)
vim.keymap.set("i", "<Tab>", function()
  if require("copilot.suggestion")
      .is_visible() then
    require("copilot.suggestion")
      .accept()
  else
    return "<Tab>"
  end
end, { expr = true })
# Counts & Repetition
Any command can be prefixed with a count: 3j = down 3 lines  |  5dw = delete 5 words  |  10@a = macro 10 times  |  2yy = yank 2 lines  |  4>> = indent 4 lines
▪ Operator + Motion Quick Reference
Delete
dd line   dw word   d$ to EOL
dgg to top   dG to bottom
d2j 3 lines   dip paragraph
Change
ciw inner word   ci" in quotes
ct, change to comma   C to EOL
cip paragraph
Yank
yy line   yiw word   y$ to EOL
yip paragraph   y3j 4 lines
yi{ inside braces
Indent
>> line   << unindent
>3j 4 lines   =G to bottom
Visual: V select then >