vim keybinding reference

Sourced directly from this platform's own ~/.vimrc, on top of stock Vim behavior ($VIMRUNTIME/defaults.vim is re-sourced first, then overridden). Leader is ,; local leader is Space. Since leader claimed ,, its old job (repeat the last f/F/t/T backwards) moved to \.

Clipboard (OSC 52, no +clipboard needed)

Key / commandAction
gy{motion}Yank a motion straight to the real system clipboard, e.g. gyiw for a word.
gyyYank the current line to the system clipboard.
gy (visual)Yank the selection to the system clipboard.
:OSCYankCopy a range (defaults to the whole file) to the system clipboard.
:OSCYankPathCopy the current file's full path to the system clipboard.

Fuzzy finder (built from matchfuzzy(), no plugin)

KeyAction
,fFuzzy-find project files.
,bFuzzy-find open buffers.
,mFuzzy-find recently opened files.
,HFuzzy-find help topics.
In the finder: type to filterLive-filters the list as you type.
Ctrl-n/↓, Ctrl-p/↑Move the selection down / up.
EnterOpen the selected item.
Esc / Ctrl-cClose the finder.

Search and quickfix

Key / commandAction
:Grep {pattern}ripgrep (or ag, or grep) straight into the quickfix list, no jump to the first hit.
,*Grep the word under the cursor.
[q / ]qPrevious / next quickfix entry.
[l / ]lPrevious / next location-list entry.
,qOpen the quickfix window.

Editing

KeyAction
YYank to end of line (matches C/D instead of yanking the whole line).
J / K (visual)Move the selected lines down / up, keeping the selection and re-indenting.
< / > (visual)Indent / outdent and keep the selection, so you can repeat it.
,p (visual)Paste over a selection without losing what was just yanked.
,dDelete to the black-hole register (does not overwrite your last yank).
Ctrl-lClear search highlighting and force a full syntax/diff refresh.
[b / ]bPrevious / next buffer.
,eToggle the netrw file explorer sidebar.
,wWrite the file.
:WWrite a file whose parent directories do not exist yet, creating them first.
:SudoWriteSave a file you opened without permission to write.
,tOpen a terminal in a split.
Esc Esc (terminal mode)Leave terminal-insert mode.