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 / command | Action |
gy{motion} | Yank a motion straight to the real system clipboard, e.g. gyiw for a word. |
gyy | Yank the current line to the system clipboard. |
gy (visual) | Yank the selection to the system clipboard. |
:OSCYank | Copy a range (defaults to the whole file) to the system clipboard. |
:OSCYankPath | Copy the current file's full path to the system clipboard. |
Fuzzy finder (built from matchfuzzy(), no plugin)
| Key | Action |
,f | Fuzzy-find project files. |
,b | Fuzzy-find open buffers. |
,m | Fuzzy-find recently opened files. |
,H | Fuzzy-find help topics. |
| In the finder: type to filter | Live-filters the list as you type. |
Ctrl-n/↓, Ctrl-p/↑ | Move the selection down / up. |
Enter | Open the selected item. |
Esc / Ctrl-c | Close the finder. |
Search and quickfix
| Key / command | Action |
: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 / ]q | Previous / next quickfix entry. |
[l / ]l | Previous / next location-list entry. |
,q | Open the quickfix window. |
Editing
| Key | Action |
Y | Yank 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. |
,d | Delete to the black-hole register (does not overwrite your last yank). |
Ctrl-l | Clear search highlighting and force a full syntax/diff refresh. |
[b / ]b | Previous / next buffer. |
,e | Toggle the netrw file explorer sidebar. |
,w | Write the file. |
:W | Write a file whose parent directories do not exist yet, creating them first. |
:SudoWrite | Save a file you opened without permission to write. |
,t | Open a terminal in a split. |
Esc Esc (terminal mode) | Leave terminal-insert mode. |