Files
rootiest 6e1c6d081a docs: add generated Vim keymap cheatsheet
Interactive single-file cheatsheet of every built-in key and this
config's live keymaps, generated by docs/cheatsheet/gen_cheatsheet.py
from $VIMRUNTIME/doc/index.txt, a headless dump of the config
(dump.lua) and curated plugin/config notes (curated/*.json).
2026-10-03 23:39:28 -04:00

995 lines
82 KiB
JSON

{
"essentials": [
{"t": "h"},
{"t": "j"},
{"t": "k"},
{"t": "l"},
{"t": "w"},
{"t": "b"},
{"t": "e"},
{"t": "ge"},
{"t": "W"},
{"t": "B"},
{"t": "E"},
{"t": "0"},
{"t": "^"},
{"t": "$"},
{"t": "gg"},
{"t": "G"},
{"t": "%"},
{"t": "{"},
{"t": "}"},
{"t": "("},
{"t": ")"},
{"t": "H"},
{"t": "M"},
{"t": "L"},
{"t": "f"},
{"t": "F"},
{"t": "t"},
{"t": "T"},
{"t": ";"},
{"t": ","},
{"t": "star"},
{"t": "#"},
{"t": "n"},
{"t": "N"},
{"t": "/"},
{"t": "?"},
{"t": "gj"},
{"t": "gk"},
{"t": "d"},
{"t": "c"},
{"t": "y"},
{"t": "p"},
{"t": "P"},
{"t": "dd"},
{"t": "cc"},
{"t": "yy"},
{"t": "D"},
{"t": "C"},
{"t": "Y"},
{"t": ">"},
{"t": "<"},
{"t": ">>"},
{"t": "<<"},
{"t": "="},
{"t": "=="},
{"t": "gu"},
{"t": "gU"},
{"t": "g~"},
{"t": "gq"},
{"t": "x"},
{"t": "r"},
{"t": "R"},
{"t": "J"},
{"t": "u"},
{"t": "CTRL-R"},
{"t": "."},
{"t": "~"},
{"t": "CTRL-A"},
{"t": "CTRL-X"},
{"t": "o"},
{"t": "O"},
{"t": "i"},
{"t": "a"},
{"t": "I"},
{"t": "A"},
{"t": "gi"},
{"t": "&"},
{"t": "v"},
{"t": "V"},
{"t": "CTRL-V"},
{"t": "gv"},
{"t": "v_o"},
{"t": "v_b_I"},
{"t": "v_b_A"},
{"t": "v_P"},
{"t": "gn"},
{"t": "m"},
{"t": "'"},
{"t": "`"},
{"t": "''"},
{"t": "CTRL-O"},
{"t": "CTRL-I"},
{"t": "g;"},
{"t": "quote"},
{"t": "q"},
{"t": "@"},
{"t": "@@"},
{"t": "Q"},
{"t": "CTRL-D"},
{"t": "CTRL-U"},
{"t": "CTRL-F"},
{"t": "CTRL-B"},
{"t": "CTRL-E"},
{"t": "CTRL-Y"},
{"t": "zz"},
{"t": "zt"},
{"t": "zb"},
{"t": "CTRL-W_s"},
{"t": "CTRL-W_v"},
{"t": "CTRL-W_w"},
{"t": "CTRL-W_h"},
{"t": "CTRL-W_j"},
{"t": "CTRL-W_k"},
{"t": "CTRL-W_l"},
{"t": "CTRL-W_q"},
{"t": "CTRL-W_o"},
{"t": "CTRL-W_="},
{"t": "za"},
{"t": "zo"},
{"t": "zc"},
{"t": "zR"},
{"t": "zM"},
{"t": "z="},
{"t": "]s"},
{"t": "CTRL-]"},
{"t": "CTRL-T"},
{"t": "gf"},
{"t": "gx"},
{"t": "CTRL-^"},
{"t": "ZZ"},
{"t": "gt"},
{"t": "CTRL-L"},
{"t": "i_<Esc>"},
{"t": "i_CTRL-R"},
{"t": "i_CTRL-W"},
{"t": "i_CTRL-U"},
{"t": "i_CTRL-O"},
{"t": "i_CTRL-X_CTRL-F"},
{"t": "i_CTRL-V"},
{"t": "c_CTRL-R"},
{"t": "c_<Tab>"},
{"t": "c_<Up>"},
{"t": "c_CTRL-U"},
{"t": "v_iw"},
{"t": "v_aw"},
{"t": "v_ip"},
{"t": "v_ap"},
{"t": "v_iquote"},
{"t": "v_aquote"},
{"t": "v_i'"},
{"t": "v_i("},
{"t": "v_a("},
{"t": "v_iB"},
{"t": "v_aB"},
{"t": "v_i["},
{"t": "v_it"},
{"t": "v_at"},
{"t": ":write"},
{"t": ":quit"},
{"t": ":wq"},
{"t": ":xit"},
{"t": ":edit"},
{"t": ":substitute"},
{"t": ":global"},
{"t": ":normal"},
{"t": ":sort"},
{"t": ":earlier"},
{"t": ":cdo"},
{"t": ":buffer"},
{"t": ":ls"},
{"t": ":split"},
{"t": ":vsplit"},
{"t": ":tabnew"},
{"t": ":nohlsearch"},
{"t": ":registers"},
{"t": ":marks"},
{"t": ":help"},
{"t": ":copen"},
{"t": ":update"},
{"t": ":wall"},
{"t": ":qall"},
{"t": ":move"},
{"t": ":copy"},
{"t": ":!"},
{"t": ":source"},
{"t": ":set"},
{"t": ":verbose"},
{"t": ":terminal"},
{"t": ":checkhealth"}
],
"builtin": {
"h": {"d": "Left N characters", "cat": "Motion"},
"l": {"d": "Right N characters", "cat": "Motion"},
"j": {"d": "Down N lines", "cat": "Motion", "n": "This config maps count-less <kbd>j</kbd>/<kbd>k</kbd> to <kbd>gj</kbd>/<kbd>gk</kbd> (display lines); <kbd>5j</kbd> still moves 5 real lines"},
"k": {"d": "Up N lines", "cat": "Motion"},
"w": {"d": "Forward to start of next word", "cat": "Motion", "n": "word = letters, digits, underscore (or a run of other non-blanks); WORD = anything up to whitespace"},
"W": {"d": "Forward to start of next WORD (blank-delimited)", "cat": "Motion", "n": "WORD = any run of non-blank characters, e.g. <code>foo.bar(baz)</code> is one WORD"},
"b": {"d": "Back to start of word", "cat": "Motion"},
"B": {"d": "Back to start of WORD", "cat": "Motion"},
"e": {"d": "Forward to end of word", "cat": "Motion"},
"E": {"d": "Forward to end of WORD", "cat": "Motion"},
"ge": {"d": "Back to end of previous word", "cat": "Motion"},
"gE": {"d": "Back to end of previous WORD", "cat": "Motion"},
"0": {"d": "To first column of the line", "cat": "Motion"},
"^": {"d": "To first non-blank character of the line", "cat": "Motion"},
"$": {"d": "To end of line (with N: end of line N-1 lines down)", "cat": "Motion", "n": "In Visual block mode <kbd>$</kbd> extends every line to its own end"},
"g_": {"d": "To last non-blank character of the line (N-1 lines down)", "cat": "Motion"},
"gg": {"d": "To first line, or to line N", "cat": "Motion"},
"G": {"d": "To last line, or to line N", "cat": "Motion"},
"N%": {"d": "To N percent through the file", "cat": "Motion"},
"%": {"d": "Jump to the matching bracket, or to the next bracket on the line", "cat": "Motion", "n": "matchit (loaded by default) also jumps between if/else/endif, HTML tags and similar pairs; see <kbd>g%</kbd>, <kbd>[%</kbd>, <kbd>]%</kbd>"},
"{": {"d": "Back to previous blank line (paragraph)", "cat": "Motion"},
"}": {"d": "Forward to next blank line (paragraph)", "cat": "Motion"},
"(": {"d": "Back N sentences", "cat": "Motion"},
")": {"d": "Forward N sentences", "cat": "Motion"},
"H": {"d": "To top line of the window (Nth line from top)", "cat": "Motion"},
"M": {"d": "To middle line of the window", "cat": "Motion"},
"L": {"d": "To bottom line of the window (Nth line from bottom)", "cat": "Motion"},
"f": {"d": "To Nth {char} to the right on this line", "cat": "Motion"},
"F": {"d": "To Nth {char} to the left on this line", "cat": "Motion"},
"t": {"d": "Till before Nth {char} to the right", "cat": "Motion"},
"T": {"d": "Till after Nth {char} to the left", "cat": "Motion"},
";": {"d": "Repeat last f/t/F/T in the same direction", "cat": "Motion"},
",": {"d": "Repeat last f/t/F/T in the opposite direction", "cat": "Motion"},
"bar": {"d": "To column N of the line", "cat": "Motion"},
"-": {"d": "Up N lines, on first non-blank", "cat": "Motion"},
"+": {"d": "Down N lines, on first non-blank", "cat": "Motion"},
"<CR>": {"d": "Down N lines, on first non-blank (same as +)", "cat": "Motion"},
"CTRL-M": {"d": "Same as <CR>: down N lines, first non-blank", "cat": "Motion"},
"_": {"d": "To first non-blank, N-1 lines down (linewise)", "cat": "Motion"},
"gj": {"d": "Down N display (wrapped) lines", "cat": "Motion"},
"gk": {"d": "Up N display (wrapped) lines", "cat": "Motion"},
"g0": {"d": "To first character of the screen line", "cat": "Motion"},
"g^": {"d": "To first non-blank of the screen line", "cat": "Motion"},
"g$": {"d": "To last character of the screen line", "cat": "Motion"},
"gm": {"d": "To middle of the screen width", "cat": "Motion"},
"gM": {"d": "To middle of the text line (N percent with a count)", "cat": "Motion"},
"go": {"d": "To byte N in the buffer", "cat": "Motion"},
"<Space>": {"d": "Right N characters (same as l)", "cat": "Motion"},
"<BS>": {"d": "Left N characters (same as h)", "cat": "Motion"},
"CTRL-H": {"d": "Left N characters (same as h)", "cat": "Motion"},
"CTRL-N": {"d": "Down N lines (same as j)", "cat": "Motion"},
"CTRL-P": {"d": "Up N lines (same as k)", "cat": "Motion"},
"CTRL-J": {"d": "Down N lines (same as j)", "cat": "Motion"},
"<NL>": {"d": "Down N lines (same as j)", "cat": "Motion"},
"[(": {"d": "Back to unmatched '('", "cat": "Motion"},
"[{": {"d": "Back to unmatched '{' (start of block)", "cat": "Motion"},
"])": {"d": "Forward to unmatched ')'", "cat": "Motion"},
"]}": {"d": "Forward to unmatched '}' (end of block)", "cat": "Motion"},
"[[": {"d": "Back to previous section ('{' in column 1)", "cat": "Motion"},
"]]": {"d": "Forward to next section ('{' in column 1)", "cat": "Motion"},
"[]": {"d": "Back to previous section end ('}' in column 1)", "cat": "Motion"},
"][": {"d": "Forward to next section end ('}' in column 1)", "cat": "Motion"},
"[m": {"d": "Back to start of a method (Java/C++ style class)", "cat": "Motion"},
"]m": {"d": "Forward to start of the next method (Java/C++ style class)", "cat": "Motion"},
"[/": {"d": "Back to start of a C comment /*", "cat": "Motion"},
"]/": {"d": "Forward to end of a C comment */", "cat": "Motion"},
"[#": {"d": "Back to unmatched #if / #else", "cat": "Motion"},
"]#": {"d": "Forward to unmatched #else / #endif", "cat": "Motion"},
"star": {"d": "Search forward for the whole word under the cursor", "cat": "Search", "n": "Whole-word match (<code>\\&lt;word\\&gt;</code>); 'ignorecase' applies, 'smartcase' does not. In Visual mode Neovim's default <kbd>*</kbd> searches for the selected text instead"},
"#": {"d": "Search backward for the whole word under the cursor", "cat": "Search"},
"gstar": {"d": "Like * but also matches inside longer words", "cat": "Search"},
"g#": {"d": "Like # but also matches inside longer words", "cat": "Search"},
"n": {"d": "Repeat last search in the same direction", "cat": "Search", "n": "<kbd>n</kbd> follows the direction of the last / or ?, so after <kbd>?</kbd> it goes backward"},
"N": {"d": "Repeat last search in the opposite direction", "cat": "Search", "n": "Opposite of the last search direction, not always 'backward'"},
"/": {"d": "Search forward for {pattern}", "cat": "Search", "n": "Case-sensitive in this config ('ignorecase' off); add <code>\\c</code> to the pattern to ignore case. Search offsets: <code>/foo/e</code> end, <code>/foo/+1</code> next line"},
"?": {"d": "Search backward for {pattern}", "cat": "Search"},
"/<CR>": {"d": "Search forward again with the last pattern", "cat": "Search"},
"?<CR>": {"d": "Search backward again with the last pattern", "cat": "Search"},
"gn": {"d": "Select next match of the last search (cgn + . changes them one by one)", "cat": "Search", "n": "Works as a text object: <kbd>cgn</kbd> changes the next match, then <kbd>.</kbd> repeats on the next one"},
"gN": {"d": "Select previous match of the last search", "cat": "Search"},
"gd": {"d": "Go to local declaration of the word (searches back in the function)", "cat": "Search", "n": "This config maps <kbd>gd</kbd> to the Snacks LSP definitions picker"},
"gD": {"d": "Go to global declaration of the word (searches from top of file)", "cat": "Search", "n": "This config maps <kbd>gD</kbd> to the Snacks LSP declarations picker"},
"CTRL-C": {"d": "Interrupt the current command or search", "cat": "Search"},
"[I": {"d": "List lines containing the word under cursor (also in included files)", "cat": "Search"},
"]I": {"d": "List lines containing the word under cursor, starting at the cursor", "cat": "Search"},
"[i": {"d": "Show first line containing the word under cursor (incl. included files)", "cat": "Search"},
"]i": {"d": "Show first line below the cursor containing the word", "cat": "Search"},
"[_CTRL-I": {"d": "Jump to first line containing the word under cursor", "cat": "Search"},
"]_CTRL-I": {"d": "Jump to first line below the cursor containing the word", "cat": "Search"},
"[D": {"d": "List #defines matching the word under cursor", "cat": "Search", "n": "Neovim remaps this key to diagnostic navigation; the #define search is only reachable via <code>:normal!</code>"},
"]D": {"d": "List #defines matching the word under cursor, starting at the cursor", "cat": "Search", "n": "Neovim remaps this key to diagnostic navigation; the #define search is only reachable via <code>:normal!</code>"},
"[d": {"d": "Show first #define matching the word under cursor", "cat": "Search", "n": "Neovim remaps this key to diagnostic navigation; the #define search is only reachable via <code>:normal!</code>"},
"]d": {"d": "Show first #define below the cursor matching the word", "cat": "Search", "n": "Neovim remaps this key to diagnostic navigation; the #define search is only reachable via <code>:normal!</code>"},
"[_CTRL-D": {"d": "Jump to first #define matching the word under cursor", "cat": "Search"},
"]_CTRL-D": {"d": "Jump to first #define below the cursor matching the word", "cat": "Search"},
"<S-LeftMouse>": {"d": "Extend the selection to the mouse click", "cat": "Visual", "n": "Neovim's default 'mousemodel' is <code>popup_setpos</code>; only with <code>extend</code> does it search the clicked word like <kbd>*</kbd>"},
"<S-RightMouse>": {"d": "Search backward for the word at the mouse click (like #)", "cat": "Search"},
"d": {"d": "Delete {motion} text [into register x]", "cat": "Operator", "n": "This config maps <kbd>d</kbd>, <kbd>D</kbd>, <kbd>c</kbd>, <kbd>C</kbd>, <kbd>x</kbd>, <kbd>X</kbd> to <code>\"d</code>…: deleted text goes to register <code>d</code>, not the clipboard. Paste it with <kbd>\"dp</kbd>"},
"c": {"d": "Change: delete {motion} text and start Insert", "cat": "Operator", "n": "Deleted text goes to register <code>d</code> in this config (see <kbd>d</kbd>)"},
"y": {"d": "Yank (copy) {motion} text [into register x]", "cat": "Operator", "n": "With 'clipboard' = unnamedplus, yanks go to the system clipboard (<code>\"+</code>)"},
">": {"d": "Indent {motion} lines one 'shiftwidth'", "cat": "Operator"},
"<": {"d": "Dedent {motion} lines one 'shiftwidth'", "cat": "Operator"},
"=": {"d": "Re-indent {motion} lines (indent rules or 'equalprg')", "cat": "Operator", "n": "Doubled operators act on lines: <kbd>==</kbd>, <kbd>dd</kbd>, <kbd>yy</kbd>, <kbd>gUU</kbd>, <kbd>gqq</kbd>"},
"!": {"d": "Filter {motion} lines through an external command", "cat": "Operator"},
"gu": {"d": "Lowercase {motion} text", "cat": "Operator"},
"gU": {"d": "Uppercase {motion} text", "cat": "Operator"},
"g~": {"d": "Toggle case of {motion} text", "cat": "Operator"},
"g?": {"d": "ROT13-encode {motion} text", "cat": "Operator"},
"gq": {"d": "Format {motion} lines ('textwidth' / 'formatexpr'); cursor moves", "cat": "Operator", "n": "When an LSP attaches, Neovim sets 'formatexpr' to the LSP formatter if it was empty"},
"gw": {"d": "Format {motion} lines and keep the cursor where it was", "cat": "Operator"},
"g@": {"d": "Run 'operatorfunc' on {motion} (custom operators)", "cat": "Operator"},
"o_v": {"d": "Force the operator to work charwise (e.g. dvj)", "cat": "Operator", "n": "Also toggles inclusive/exclusive for charwise motions: <kbd>dve</kbd> leaves the last char"},
"o_V": {"d": "Force the operator to work linewise (e.g. dVw)", "cat": "Operator"},
"o_CTRL-V": {"d": "Force the operator to work blockwise", "cat": "Operator"},
"dd": {"d": "Delete N lines", "cat": "Edit"},
"cc": {"d": "Change N whole lines", "cat": "Edit"},
"yy": {"d": "Yank N lines", "cat": "Edit"},
"D": {"d": "Delete to end of line (and N-1 more lines)", "cat": "Edit"},
"C": {"d": "Change to end of line (and N-1 more lines)", "cat": "Edit"},
"Y": {"d": "Yank N lines (Neovim maps Y to y$: yank to end of line)", "cat": "Edit", "n": "Neovim default mapping <code>Y</code> → <code>y$</code> (like D and C); use <kbd>yy</kbd> for whole lines"},
"p": {"d": "Put (paste) after the cursor N times", "cat": "Edit", "n": "With 'clipboard' = unnamedplus, <kbd>p</kbd> pastes the system clipboard. Deletes go to <code>\"d</code> in this config, so use <kbd>\"dp</kbd> to paste deleted text"},
"P": {"d": "Put (paste) before the cursor N times", "cat": "Edit", "n": "Unlike <kbd>p</kbd>, <kbd>P</kbd> in Visual mode keeps the register, so you can paste repeatedly"},
"gp": {"d": "Put after the cursor and leave the cursor after the pasted text", "cat": "Edit"},
"gP": {"d": "Put before the cursor and leave the cursor after the pasted text", "cat": "Edit"},
"]p": {"d": "Put after, adjusting indent to the current line", "cat": "Edit"},
"[p": {"d": "Put before, adjusting indent to the current line", "cat": "Edit"},
"]P": {"d": "Put before, adjusting indent (same as [p)", "cat": "Edit"},
"[P": {"d": "Put before, adjusting indent (same as [p)", "cat": "Edit"},
">>": {"d": "Indent N lines one 'shiftwidth'", "cat": "Edit"},
"<<": {"d": "Dedent N lines one 'shiftwidth'", "cat": "Edit"},
"==": {"d": "Re-indent N lines", "cat": "Edit"},
"!!": {"d": "Filter N lines through an external command", "cat": "Edit"},
"x": {"d": "Delete N characters under and after the cursor", "cat": "Edit", "n": "Mapped to <code>\"dx</code> here: the character goes to register <code>d</code>"},
"X": {"d": "Delete N characters before the cursor", "cat": "Edit"},
"s": {"d": "Delete N characters and start Insert", "cat": "Edit"},
"S": {"d": "Delete N lines and start Insert (same as cc)", "cat": "Edit"},
"r": {"d": "Replace N characters with {char}", "cat": "Edit"},
"R": {"d": "Enter Replace mode (overtype)", "cat": "Edit"},
"gR": {"d": "Enter Virtual Replace mode (overtype screen cells, tabs stay intact)", "cat": "Edit"},
"gr": {"d": "Virtual-replace N characters with {char}", "cat": "Edit", "n": "Neovim's <kbd>grn</kbd>/<kbd>gra</kbd>/<kbd>grr</kbd>/<kbd>gri</kbd>/<kbd>grt</kbd>/<kbd>grx</kbd> LSP maps extend <kbd>gr</kbd>, so it waits for 'timeoutlen' before acting"},
"J": {"d": "Join N lines (default 2) with one space", "cat": "Edit", "n": "In Visual mode joins the selected lines"},
"gJ": {"d": "Join lines without inserting or removing spaces", "cat": "Edit"},
"CTRL-A": {"d": "Increment the number at or after the cursor by N", "cat": "Edit", "n": "Works on decimal, 0x hex, 0b binary and (with 'nrformats') letters; <kbd>g&lt;C-a&gt;</kbd> in Visual makes a sequence"},
"CTRL-X": {"d": "Decrement the number at or after the cursor by N", "cat": "Edit"},
"g?g?": {"d": "ROT13-encode the current line", "cat": "Edit"},
"zp": {"d": "Put block without trailing spaces (after)", "cat": "Edit"},
"zP": {"d": "Put block without trailing spaces (before)", "cat": "Edit"},
"zy": {"d": "Yank {motion} without trailing spaces (block mode)", "cat": "Edit"},
"<MiddleMouse>": {"d": "Paste at the mouse position (like gP)", "cat": "Edit"},
"<Del>": {"d": "Delete N characters under the cursor (same as x)", "cat": "Edit"},
"i": {"d": "Insert before the cursor", "cat": "Insert", "n": "A count repeats the inserted text: <kbd>3ihey&lt;Esc&gt;</kbd> → heyheyhey"},
"a": {"d": "Append after the cursor", "cat": "Insert"},
"I": {"d": "Insert at first non-blank of the line", "cat": "Insert"},
"A": {"d": "Append at end of line", "cat": "Insert"},
"gI": {"d": "Insert at column 1", "cat": "Insert", "n": "This config maps <kbd>gI</kbd> to the Snacks LSP implementations picker"},
"gi": {"d": "Insert where Insert mode was last stopped", "cat": "Insert"},
"o": {"d": "Open a new line below and start Insert", "cat": "Insert"},
"O": {"d": "Open a new line above and start Insert", "cat": "Insert"},
"<Insert>": {"d": "Start Insert mode (same as i)", "cat": "Insert"},
"u": {"d": "Undo the last change", "cat": "Undo & repeat", "n": "'undofile' is on in this config, so undo history survives closing the file"},
"CTRL-R": {"d": "Redo the last undone change", "cat": "Undo & repeat"},
"U": {"d": "Undo all recent changes on the last changed line (is itself undoable)", "cat": "Undo & repeat"},
".": {"d": "Repeat the last change (a count replaces the original count)", "cat": "Undo & repeat", "n": "Repeats inserts too: <kbd>A;&lt;Esc&gt;</kbd> then <kbd>j.</kbd> appends ; to the next line"},
"&": {"d": "Repeat last :s on the current line (Neovim: same flags, :&&)", "cat": "Undo & repeat", "n": "Neovim default mapping <code>&amp;</code> → <code>:&amp;&amp;&lt;CR&gt;</code> keeps the last flags (Vim's plain & drops them)"},
"g&": {"d": "Repeat last :s on all lines with the same pattern and flags", "cat": "Undo & repeat"},
"g-": {"d": "Go to older text state (walks undo branches by time)", "cat": "Undo & repeat"},
"g+": {"d": "Go to newer text state (walks undo branches by time)", "cat": "Undo & repeat"},
"<Undo>": {"d": "Undo (same as u)", "cat": "Undo & repeat"},
"@:": {"d": "Repeat the last command-line command N times", "cat": "Undo & repeat", "n": "After the first <kbd>@:</kbd>, <kbd>@@</kbd> repeats it again"},
"v": {"d": "Start charwise Visual mode", "cat": "Visual"},
"V": {"d": "Start linewise Visual mode", "cat": "Visual"},
"CTRL-V": {"d": "Start blockwise Visual mode", "cat": "Visual"},
"gv": {"d": "Reselect the previous Visual area", "cat": "Visual"},
"v_o": {"d": "Move the cursor to the other end of the selection", "cat": "Visual"},
"v_O": {"d": "Block mode: move to the other corner on the same line", "cat": "Visual"},
"v_b_I": {"d": "Block mode: insert the same text before the block on every line", "cat": "Visual", "n": "Type the text, then <kbd>&lt;Esc&gt;</kbd>: it appears on every line of the block"},
"v_b_A": {"d": "Block mode: append the same text after the block on every line", "cat": "Visual"},
"v_gv": {"d": "Swap the current and previous Visual areas", "cat": "Visual"},
"v_v": {"d": "Switch to charwise Visual, or stop Visual mode", "cat": "Visual"},
"v_V": {"d": "Switch to linewise Visual, or stop Visual mode", "cat": "Visual"},
"v_CTRL-V": {"d": "Switch to blockwise Visual, or stop Visual mode", "cat": "Visual"},
"v_<Esc>": {"d": "Stop Visual mode", "cat": "Visual"},
"v_CTRL-C": {"d": "Stop Visual mode", "cat": "Visual"},
"v_CTRL-G": {"d": "Toggle between Visual and Select mode", "cat": "Visual"},
"v_CTRL-O": {"d": "Select mode: switch to Visual mode for one command", "cat": "Visual"},
"gh": {"d": "Start Select mode (charwise)", "cat": "Visual"},
"gH": {"d": "Start Select mode (linewise)", "cat": "Visual"},
"g_CTRL-H": {"d": "Start Select mode (blockwise)", "cat": "Visual"},
"gV": {"d": "In a Select-mode mapping: don't reselect the area afterwards", "cat": "Visual"},
"v_CTRL-\\_CTRL-N": {"d": "Stop Visual mode", "cat": "Visual"},
"v_CTRL-\\_CTRL-G": {"d": "Stop Visual mode (go to Normal)", "cat": "Visual"},
"<RightMouse>": {"d": "Open the right-click popup menu (moves the cursor to the click)", "cat": "Misc", "n": "Neovim's default 'mousemodel' is <code>popup_setpos</code>; with <code>extend</code> it starts or extends Visual mode instead"},
"v_c": {"d": "Change the selection (delete and start Insert)", "n": "Mapped to <code>\"dc</code> in this config (register <code>d</code>)"},
"v_s": {"d": "Change the selection (same as c)"},
"v_d": {"d": "Delete the selection", "n": "Mapped to <code>\"dd</code> in this config (register <code>d</code>)"},
"v_x": {"d": "Delete the selection (same as d)", "n": "Mapped to <code>\"dx</code> in this config (register <code>d</code>)"},
"v_y": {"d": "Yank the selection"},
"v_C": {"d": "Change the selected lines (block: to end of each line)"},
"v_S": {"d": "Change the selected lines"},
"v_R": {"d": "Change the selected lines"},
"v_D": {"d": "Delete the selected lines (block: to end of each line)"},
"v_X": {"d": "Delete the selected lines"},
"v_Y": {"d": "Yank the selected lines"},
"v_p": {"d": "Replace the selection with the register (old text goes to the unnamed register)", "n": "The replaced text goes to the unnamed register, so a second <kbd>p</kbd> pastes the old text; use <kbd>P</kbd> to keep pasting the same thing"},
"v_P": {"d": "Replace the selection with the register (registers unchanged)"},
"v_r": {"d": "Replace every selected character with {char}"},
"v_J": {"d": "Join the selected lines"},
"v_gJ": {"d": "Join the selected lines without spaces"},
"v_u": {"d": "Lowercase the selection"},
"v_U": {"d": "Uppercase the selection"},
"v_~": {"d": "Toggle case of the selection"},
"v_>": {"d": "Indent the selected lines (N times)"},
"v_<": {"d": "Dedent the selected lines (N times)"},
"v_=": {"d": "Re-indent the selected lines"},
"v_gq": {"d": "Format the selected lines"},
"v_!": {"d": "Filter the selected lines through an external command"},
"v_CTRL-A": {"d": "Increment numbers in the selection by N"},
"v_CTRL-X": {"d": "Decrement numbers in the selection by N"},
"v_g_CTRL-A": {"d": "Increment numbers progressively (+N, +2N, … per line)", "n": "Select a column of 0s and press <kbd>g&lt;C-a&gt;</kbd> to number them 1, 2, 3…"},
"v_g_CTRL-X": {"d": "Decrement numbers progressively (-N, -2N, … per line)"},
"v_:": {"d": "Start a command line with the range '<,'> of the selection", "cat": "Command line"},
"v_<BS>": {"d": "Select mode: delete the selection"},
"v_CTRL-H": {"d": "Select mode: delete the selection"},
"m": {"d": "Set mark {a-zA-Z} at the cursor (A-Z are global, across files)", "cat": "Mark & jump", "n": "Special marks: <code>.</code> last change, <code>^</code> last insert, <code>\"</code> last exit, <code>[ ]</code> last change/yank, <code>&lt; &gt;</code> last selection"},
"'": {"d": "Jump to the line of mark {a-zA-Z0-9} (first non-blank)", "cat": "Mark & jump"},
"`": {"d": "Jump to the exact position of mark {a-zA-Z0-9}", "cat": "Mark & jump"},
"''": {"d": "Jump back to the line before the latest jump", "cat": "Mark & jump"},
"``": {"d": "Jump back to the position before the latest jump", "cat": "Mark & jump"},
"CTRL-O": {"d": "Jump to an older position in the jump list", "cat": "Mark & jump", "n": "Jumps are made by G, /, n, %, (, {, marks, etc. — not by j/k or w"},
"CTRL-I": {"d": "Jump to a newer position in the jump list", "cat": "Mark & jump", "n": "<b>Shadowed here:</b> this config maps <kbd>&lt;Tab&gt;</kbd> (Sidekick NES, no fallback) and <kbd>&lt;C-i&gt;</kbd> is not mapped separately, so per <code>:h CTRL-I</code> the <kbd>&lt;Tab&gt;</kbd> map also catches <kbd>&lt;C-i&gt;</kbd>, even in kitty or Neovide; use <kbd>&lt;leader&gt;sj</kbd>"},
"<Tab>": {"d": "Jump to a newer position in the jump list (same as CTRL-I)", "cat": "Mark & jump", "n": "This config maps Normal-mode <kbd>&lt;Tab&gt;</kbd> to Sidekick NES jump/apply (no fallback)"},
"g;": {"d": "Go to an older position in the change list", "cat": "Mark & jump", "n": "Change list = positions of your edits; <kbd>:changes</kbd> lists them"},
"g,": {"d": "Go to a newer position in the change list", "cat": "Mark & jump"},
"`[": {"d": "To start of the last changed, yanked or put text", "cat": "Mark & jump"},
"`]": {"d": "To end of the last changed, yanked or put text", "cat": "Mark & jump"},
"'[": {"d": "To first line of the last changed, yanked or put text", "cat": "Mark & jump"},
"']": {"d": "To last line of the last changed, yanked or put text", "cat": "Mark & jump"},
"`<": {"d": "To start of the last Visual selection", "cat": "Mark & jump"},
"`>": {"d": "To end of the last Visual selection", "cat": "Mark & jump"},
"'<": {"d": "To first line of the last Visual selection", "cat": "Mark & jump"},
"'>": {"d": "To last line of the last Visual selection", "cat": "Mark & jump"},
"g'": {"d": "Jump to mark without adding to the jump list (line)", "cat": "Mark & jump"},
"g`": {"d": "Jump to mark without adding to the jump list (exact position)", "cat": "Mark & jump"},
"['": {"d": "To previous line with a lowercase mark", "cat": "Mark & jump"},
"]'": {"d": "To next line with a lowercase mark", "cat": "Mark & jump"},
"[`": {"d": "To previous lowercase mark", "cat": "Mark & jump"},
"]`": {"d": "To next lowercase mark", "cat": "Mark & jump"},
"quote": {"d": "Use register {x} for the next delete, yank or put", "cat": "Register & macro", "n": "<code>\"\"</code> unnamed, <code>\"0</code> last yank, <code>\"1-9</code> deletes, <code>\"+</code> clipboard, <code>\"_</code> black hole, <code>\"/</code> search, <code>\":</code> last command. In this config d/c/x default to <code>\"d</code> but honour a register you type (except <code>\"+</code>)"},
"@": {"d": "Run the macro in register {a-z} N times", "cat": "Register & macro", "n": "Macros are just registers: <kbd>\"ap</kbd> pastes one to edit, <kbd>\"ayy</kbd> stores it back"},
"@@": {"d": "Repeat the last executed macro (or @:) N times", "cat": "Register & macro"},
"Q": {"d": "Replay the last recorded macro N times", "cat": "Register & macro", "n": "Neovim: <kbd>Q</kbd> replays the last recorded register (Vim's Ex mode is <kbd>gQ</kbd>). In linewise Visual it runs on every selected line"},
"CTRL-D": {"d": "Scroll half a screen down (N lines with a count)", "cat": "Scroll & view"},
"CTRL-U": {"d": "Scroll half a screen up (N lines with a count)", "cat": "Scroll & view"},
"CTRL-F": {"d": "Scroll one screen forward (page down)", "cat": "Scroll & view"},
"CTRL-B": {"d": "Scroll one screen back (page up)", "cat": "Scroll & view"},
"CTRL-E": {"d": "Scroll the view N lines down (text moves up, cursor stays)", "cat": "Scroll & view"},
"CTRL-Y": {"d": "Scroll the view N lines up (text moves down, cursor stays)", "cat": "Scroll & view"},
"zz": {"d": "Scroll so the cursor line is centered", "cat": "Scroll & view"},
"zt": {"d": "Scroll so the cursor line is at the top", "cat": "Scroll & view"},
"zb": {"d": "Scroll so the cursor line is at the bottom", "cat": "Scroll & view"},
"z<CR>": {"d": "Cursor line to top of window, cursor on first non-blank", "cat": "Scroll & view"},
"z.": {"d": "Cursor line to center of window, cursor on first non-blank", "cat": "Scroll & view"},
"z-": {"d": "Cursor line to bottom of window, cursor on first non-blank", "cat": "Scroll & view"},
"zh": {"d": "Scroll the view N characters left (nowrap only)", "cat": "Scroll & view"},
"zl": {"d": "Scroll the view N characters right (nowrap only)", "cat": "Scroll & view"},
"zH": {"d": "Scroll the view half a screen width left (nowrap only)", "cat": "Scroll & view"},
"zL": {"d": "Scroll the view half a screen width right (nowrap only)", "cat": "Scroll & view"},
"zs": {"d": "Scroll horizontally so the cursor is at the left edge (nowrap only)", "cat": "Scroll & view"},
"ze": {"d": "Scroll horizontally so the cursor is at the right edge (nowrap only)", "cat": "Scroll & view"},
"<PageDown>": {"d": "Scroll one screen forward (same as CTRL-F)", "cat": "Scroll & view"},
"<PageUp>": {"d": "Scroll one screen back (same as CTRL-B)", "cat": "Scroll & view"},
"i_<PageUp>": {"d": "Scroll one screen back", "cat": "Scroll & view"},
"i_<PageDown>": {"d": "Scroll one screen forward", "cat": "Scroll & view"},
"i_CTRL-X_CTRL-E": {"d": "Scroll the window one line down (like CTRL-E) in CTRL-X mode", "cat": "Scroll & view"},
"i_CTRL-X_CTRL-Y": {"d": "Scroll the window one line up (like CTRL-Y) in CTRL-X mode", "cat": "Scroll & view"},
"i_<ScrollWheelDown>": {"cat": "Scroll & view"},
"i_<S-ScrollWheelDown>": {"cat": "Scroll & view"},
"i_<ScrollWheelUp>": {"cat": "Scroll & view"},
"i_<S-ScrollWheelUp>": {"cat": "Scroll & view"},
"i_<ScrollWheelLeft>": {"cat": "Scroll & view"},
"i_<S-ScrollWheelLeft>": {"cat": "Scroll & view"},
"i_<ScrollWheelRight>": {"cat": "Scroll & view"},
"i_<S-ScrollWheelRight>": {"cat": "Scroll & view"},
"CTRL-W": {"d": "Window command prefix (see the <C-w> keys)", "cat": "Window"},
"CTRL-W_s": {"d": "Split the window horizontally", "cat": "Window"},
"CTRL-W_S": {"d": "Split the window horizontally (same as s)", "cat": "Window"},
"CTRL-W_v": {"d": "Split the window vertically", "cat": "Window"},
"CTRL-W_w": {"d": "Go to the next window (wraps); with N: go to window N", "cat": "Window", "n": "Most CTRL-W keys also work with CTRL held for the second key: <kbd>&lt;C-w&gt;&lt;C-w&gt;</kbd>"},
"CTRL-W_W": {"d": "Go to the previous window (wraps)", "cat": "Window"},
"CTRL-W_h": {"d": "Go to the window on the left", "cat": "Window"},
"CTRL-W_j": {"d": "Go to the window below", "cat": "Window"},
"CTRL-W_k": {"d": "Go to the window above", "cat": "Window"},
"CTRL-W_l": {"d": "Go to the window on the right", "cat": "Window"},
"CTRL-W_t": {"d": "Go to the top-left window", "cat": "Window"},
"CTRL-W_b": {"d": "Go to the bottom-right window", "cat": "Window"},
"CTRL-W_p": {"d": "Go to the previous (last accessed) window", "cat": "Window"},
"CTRL-W_q": {"d": "Quit the window (like :quit; quits Neovim if it is the last)", "cat": "Window"},
"CTRL-W_c": {"d": "Close the window (like :close; never closes the last one)", "cat": "Window", "n": "<kbd>&lt;C-w&gt;c</kbd> rather than <kbd>&lt;C-w&gt;&lt;C-c&gt;</kbd> (CTRL-C cancels)"},
"CTRL-W_o": {"d": "Close all other windows (like :only)", "cat": "Window"},
"CTRL-W_=": {"d": "Make all windows (almost) the same size", "cat": "Window"},
"CTRL-W__": {"d": "Maximize window height (or set it to N)", "cat": "Window"},
"CTRL-W_bar": {"d": "Maximize window width (or set it to N columns)", "cat": "Window"},
"CTRL-W_+": {"d": "Increase window height by N lines", "cat": "Window"},
"CTRL-W_-": {"d": "Decrease window height by N lines", "cat": "Window"},
"CTRL-W_>": {"d": "Increase window width by N columns", "cat": "Window"},
"CTRL-W_<": {"d": "Decrease window width by N columns", "cat": "Window"},
"CTRL-W_x": {"d": "Swap with the next window (or window N)", "cat": "Window"},
"CTRL-W_r": {"d": "Rotate windows downwards / rightwards", "cat": "Window"},
"CTRL-W_R": {"d": "Rotate windows upwards / leftwards", "cat": "Window"},
"CTRL-W_H": {"d": "Move the window to the far left (full height)", "cat": "Window"},
"CTRL-W_J": {"d": "Move the window to the very bottom (full width)", "cat": "Window"},
"CTRL-W_K": {"d": "Move the window to the very top (full width)", "cat": "Window"},
"CTRL-W_L": {"d": "Move the window to the far right (full height)", "cat": "Window"},
"CTRL-W_T": {"d": "Move the window to a new tab page", "cat": "Window"},
"CTRL-W_n": {"d": "Open a new window with an empty buffer", "cat": "Window"},
"CTRL-W_f": {"d": "Split and edit the file name under the cursor", "cat": "Window"},
"CTRL-W_F": {"d": "Split, edit the file under the cursor and go to its line number", "cat": "Window"},
"CTRL-W_gf": {"d": "Edit the file name under the cursor in a new tab", "cat": "Window"},
"CTRL-W_]": {"d": "Split and jump to the tag under the cursor", "cat": "Window"},
"CTRL-W_}": {"d": "Show the tag under the cursor in the preview window", "cat": "Window"},
"CTRL-W_z": {"d": "Close the preview window", "cat": "Window"},
"CTRL-W_P": {"d": "Go to the preview window", "cat": "Window"},
"CTRL-W_^": {"d": "Split and edit the alternate file (or buffer N)", "cat": "Window"},
"CTRL-W_d": {"d": "Split and jump to the #define of the word under the cursor", "cat": "Window", "n": "Neovim remaps <kbd>&lt;C-w&gt;d</kbd> / <kbd>&lt;C-w&gt;&lt;C-d&gt;</kbd> to show diagnostics in a float"},
"CTRL-W_i": {"d": "Split and jump to the declaration of the word under the cursor", "cat": "Window"},
"CTRL-W_CTRL-C": {"d": "Does nothing (cancels a pending CTRL-W)", "cat": "Window"},
"za": {"d": "Toggle the fold under the cursor", "cat": "Fold"},
"zA": {"d": "Toggle the fold under the cursor recursively", "cat": "Fold"},
"zo": {"d": "Open the fold under the cursor", "cat": "Fold"},
"zO": {"d": "Open all folds under the cursor recursively", "cat": "Fold"},
"zc": {"d": "Close the fold under the cursor", "cat": "Fold"},
"zC": {"d": "Close all folds under the cursor recursively", "cat": "Fold"},
"zR": {"d": "Open all folds (set 'foldlevel' to the deepest)", "cat": "Fold"},
"zM": {"d": "Close all folds (set 'foldlevel' to 0)", "cat": "Fold"},
"zr": {"d": "Open one more fold level everywhere ('foldlevel' + 1)", "cat": "Fold"},
"zm": {"d": "Close one more fold level everywhere ('foldlevel' - 1)", "cat": "Fold"},
"zv": {"d": "Open just enough folds to show the cursor line", "cat": "Fold"},
"zx": {"d": "Reset folds to 'foldlevel', then show the cursor line", "cat": "Fold"},
"zX": {"d": "Reset folds to 'foldlevel'", "cat": "Fold"},
"zj": {"d": "Move down to the start of the next fold", "cat": "Fold"},
"zk": {"d": "Move up to the end of the previous fold", "cat": "Fold"},
"[z": {"d": "Move to the start of the current open fold", "cat": "Fold"},
"]z": {"d": "Move to the end of the current open fold", "cat": "Fold"},
"zf": {"d": "Create a fold over {motion} (manual / marker folding)", "cat": "Fold"},
"zF": {"d": "Create a fold for N lines", "cat": "Fold"},
"zd": {"d": "Delete the fold under the cursor", "cat": "Fold"},
"zD": {"d": "Delete folds under the cursor recursively", "cat": "Fold"},
"zE": {"d": "Delete all folds in the window", "cat": "Fold"},
"zi": {"d": "Toggle folding on/off ('foldenable')", "cat": "Fold"},
"zn": {"d": "Disable folding (open everything)", "cat": "Fold"},
"zN": {"d": "Re-enable folding", "cat": "Fold"},
"z=": {"d": "Spelling suggestions for the word under the cursor", "cat": "Spell", "n": "Needs 'spell' on (<code>:set spell</code>); a count picks suggestion N directly"},
"zg": {"d": "Add the word to the spell file as correct", "cat": "Spell"},
"zw": {"d": "Add the word to the spell file as wrong", "cat": "Spell"},
"zG": {"d": "Mark the word correct for this session only", "cat": "Spell"},
"zW": {"d": "Mark the word wrong for this session only", "cat": "Spell"},
"zug": {"d": "Undo zg (remove the word from the spell file)", "cat": "Spell"},
"zuw": {"d": "Undo zw", "cat": "Spell"},
"zuG": {"d": "Undo zG", "cat": "Spell"},
"zuW": {"d": "Undo zW", "cat": "Spell"},
"]s": {"d": "Move to the next misspelled word", "cat": "Spell"},
"[s": {"d": "Move to the previous misspelled word", "cat": "Spell"},
"do": {"d": "Diff: obtain the change from the other window (:diffget)", "cat": "Diff"},
"dp": {"d": "Diff: put the change into the other window (:diffput)", "cat": "Diff"},
"]c": {"d": "Diff: next change", "cat": "Diff", "n": "Not remapped here: gitsigns is set up without keymaps, so <kbd>]c</kbd>/<kbd>[c</kbd> only move between diff changes"},
"[c": {"d": "Diff: previous change", "cat": "Diff"},
"CTRL-]": {"d": "Jump to the definition (tag) of the word under the cursor", "cat": "Tags", "n": "When an LSP client attaches, Neovim sets 'tagfunc', so <kbd>&lt;C-]&gt;</kbd> goes to the LSP definition and <kbd>&lt;C-t&gt;</kbd> comes back"},
"CTRL-T": {"d": "Jump back up the tag stack", "cat": "Tags"},
"g]": {"d": "List all tags matching the word under the cursor (:tselect)", "cat": "Tags"},
"g_CTRL-]": {"d": "Jump to the tag, or list matches if there are several (:tjump)", "cat": "Tags"},
"v_CTRL-]": {"d": "Jump to the tag of the selected text", "cat": "Tags"},
"<C-LeftMouse>": {"d": "Jump to the tag of the word at the mouse click", "cat": "Tags"},
"<C-RightMouse>": {"d": "Jump back up the tag stack (same as CTRL-T)", "cat": "Tags"},
"gf": {"d": "Edit the file whose name is under the cursor", "cat": "Files"},
"gF": {"d": "Edit the file under the cursor and jump to the line number after it", "cat": "Files"},
"gx": {"d": "Open the file path or URL under the cursor with the system handler", "cat": "Files", "n": "Neovim maps <kbd>gx</kbd> (Normal and Visual) to <code>vim.ui.open()</code>: URLs, paths, LSP document links; in help files, help tags"},
"CTRL-G": {"d": "Show the file name, line count and cursor position", "cat": "Files"},
"g_CTRL-G": {"d": "Show cursor position plus word, character and byte counts", "cat": "Files"},
"ZZ": {"d": "Write if changed and close the window (like :x)", "cat": "Files"},
"ZQ": {"d": "Close the window without writing (like :q!)", "cat": "Files"},
"CTRL-Z": {"d": "Suspend Neovim (resume with fg in the shell)", "cat": "Files"},
"[f": {"d": "Edit the file under the cursor (same as gf)", "cat": "Files"},
"]f": {"d": "Edit the file under the cursor (same as gf)", "cat": "Files"},
"CTRL-^": {"d": "Switch to the alternate (previous) buffer; with N: buffer N", "cat": "Buffer & tab", "n": "The quickest way to toggle between two files"},
"gt": {"d": "Go to the next tab page (with N: tab page N)", "cat": "Buffer & tab"},
"gT": {"d": "Go to the previous tab page", "cat": "Buffer & tab"},
"g<Tab>": {"d": "Go to the last accessed tab page", "cat": "Buffer & tab"},
"CTRL-<Tab>": {"d": "Go to the last accessed tab page", "cat": "Buffer & tab"},
"<C-Tab>": {"d": "Go to the last accessed tab page", "cat": "Buffer & tab"},
"K": {"d": "Look up the keyword under the cursor with 'keywordprg'", "cat": "Help", "n": "This config maps <kbd>K</kbd> to LSP hover"},
"v_K": {"d": "Look up the selected text with 'keywordprg'", "cat": "Help"},
"<Help>": {"d": "Open the help window", "cat": "Help"},
"<F1>": {"d": "Open the help window", "cat": "Help"},
"i_<Help>": {"d": "Leave Insert mode and open the help window", "cat": "Help"},
"CTRL-L": {"d": "Redraw the screen (Neovim default: also clears search highlight)", "cat": "Search", "n": "Neovim default mapping: <code>:nohlsearch | diffupdate | normal! &lt;C-L&gt;</code>"},
"ga": {"d": "Show the character code under the cursor (decimal, hex, octal)", "cat": "Help", "n": "This config's <kbd>gai</kbd>/<kbd>gao</kbd> (LSP calls) make <kbd>ga</kbd> wait for 'timeoutlen'"},
"g8": {"d": "Show the UTF-8 bytes of the character under the cursor", "cat": "Help"},
"g<": {"d": "Show the output of the previous command again", "cat": "Misc"},
"gs": {"d": "Sleep N seconds (default 1)", "cat": "Misc"},
"count": {"d": "Count: repeat or scale the next command (3w, 5dd, 2p)", "cat": "Misc"},
"N<Del>": {"d": "While typing a count: remove its last digit", "cat": "Misc"},
"CTRL-\\_CTRL-N": {"d": "Go to Normal mode (no-op in Normal mode; useful in mappings)", "cat": "Misc"},
"CTRL-\\_CTRL-G": {"d": "Go to Normal mode (no-op in Normal mode)", "cat": "Misc"},
"[": {"d": "Square-bracket command prefix ([( [{ [s [c [d …)", "cat": "Misc"},
"]": {"d": "Square-bracket command prefix (]) ]} ]s ]c ]d …)", "cat": "Misc"},
"g": {"d": "Extended command prefix (gg, gu, gq, gv, gx …)", "cat": "Misc"},
"z": {"d": "Fold / scroll / spell command prefix (za, zz, z= …)", "cat": "Misc"},
":": {"d": "Start an Ex command (command-line mode)", "cat": "Command line"},
"N:": {"d": "Start an Ex command with the range .,.+(N-1)", "cat": "Command line", "n": "<kbd>5:</kbd> pre-fills <code>:.,.+4</code>"},
"q:": {"d": "Open the command-line window with : history (edit and re-run)", "cat": "Command line", "n": "In this config <kbd>&lt;CR&gt;</kbd> in Normal mode starts Leap here; press <kbd>i</kbd> then <kbd>&lt;CR&gt;</kbd> to run the line"},
"q/": {"d": "Open the command-line window with / search history", "cat": "Command line"},
"q?": {"d": "Open the command-line window with ? search history", "cat": "Command line"},
"gQ": {"d": "Enter Ex mode (keep entering : commands; :vi to return)", "cat": "Command line"},
"<LeftMouse>": {"d": "Move the cursor to the mouse click", "cat": "Motion"},
"v_iw": {"d": "Inner word", "cat": "Text object", "n": "Text objects work after an operator (<kbd>diw</kbd>, <kbd>ci\"</kbd>, <kbd>yap</kbd>) or in Visual mode; <kbd>i</kbd> = inner, <kbd>a</kbd> = around"},
"v_aw": {"d": "A word, plus surrounding white space", "cat": "Text object", "n": "<kbd>daw</kbd> deletes the word and one space, so the sentence stays tidy"},
"v_iW": {"d": "Inner WORD", "cat": "Text object"},
"v_aW": {"d": "A WORD, plus surrounding white space", "cat": "Text object"},
"v_is": {"d": "Inner sentence", "cat": "Text object"},
"v_as": {"d": "A sentence, plus white space", "cat": "Text object"},
"v_ip": {"d": "Inner paragraph", "cat": "Text object"},
"v_ap": {"d": "A paragraph, plus the following blank lines", "cat": "Text object"},
"v_iquote": {"d": "Inside double quotes", "cat": "Text object"},
"v_aquote": {"d": "Double-quoted string including the quotes", "cat": "Text object"},
"v_i'": {"d": "Inside single quotes", "cat": "Text object"},
"v_a'": {"d": "Single-quoted string including the quotes", "cat": "Text object"},
"v_i`": {"d": "Inside backticks", "cat": "Text object"},
"v_a`": {"d": "Backtick string including the backticks", "cat": "Text object"},
"v_ib": {"d": "Inside ( ) parentheses", "cat": "Text object"},
"v_ab": {"d": "( ) block including the parentheses", "cat": "Text object"},
"v_i(": {"d": "Inside ( ) parentheses (same as ib)", "cat": "Text object"},
"v_i)": {"d": "Inside ( ) parentheses (same as ib)", "cat": "Text object"},
"v_a(": {"d": "( ) block including the parentheses (same as ab)", "cat": "Text object"},
"v_a)": {"d": "( ) block including the parentheses (same as ab)", "cat": "Text object"},
"v_iB": {"d": "Inside { } braces", "cat": "Text object"},
"v_aB": {"d": "{ } block including the braces", "cat": "Text object"},
"v_i{": {"d": "Inside { } braces (same as iB)", "cat": "Text object"},
"v_i}": {"d": "Inside { } braces (same as iB)", "cat": "Text object"},
"v_a{": {"d": "{ } block including the braces (same as aB)", "cat": "Text object"},
"v_a}": {"d": "{ } block including the braces (same as aB)", "cat": "Text object"},
"v_i[": {"d": "Inside [ ] brackets", "cat": "Text object"},
"v_i]": {"d": "Inside [ ] brackets", "cat": "Text object"},
"v_a[": {"d": "[ ] block including the brackets", "cat": "Text object"},
"v_a]": {"d": "[ ] block including the brackets", "cat": "Text object"},
"v_i<": {"d": "Inside < > angle brackets", "cat": "Text object"},
"v_i>": {"d": "Inside < > angle brackets", "cat": "Text object"},
"v_a<": {"d": "< > block including the angle brackets", "cat": "Text object"},
"v_a>": {"d": "< > block including the angle brackets", "cat": "Text object"},
"v_it": {"d": "Inside an XML/HTML tag pair", "cat": "Text object"},
"v_at": {"d": "XML/HTML tag pair including the tags", "cat": "Text object"},
"i_<Esc>": {"d": "Leave Insert mode", "cat": "Insert"},
"i_CTRL-[": {"d": "Leave Insert mode (same as <Esc>)", "cat": "Insert"},
"i_CTRL-C": {"d": "Leave Insert mode without abbreviations or InsertLeave", "cat": "Insert", "n": "Skips InsertLeave autocmds, which plugins may rely on; prefer <kbd>&lt;Esc&gt;</kbd>"},
"i_CTRL-R": {"d": "Insert the contents of register {reg}", "cat": "Insert", "n": "<kbd>&lt;C-r&gt;+</kbd> clipboard, <kbd>&lt;C-r&gt;\"</kbd> unnamed, <kbd>&lt;C-r&gt;=</kbd> expression (e.g. <code>=5*7</code>), <kbd>&lt;C-r&gt;/</kbd> last search"},
"i_CTRL-R_CTRL-R": {"d": "Insert register literally (keys like <BS> in it are not applied)", "cat": "Insert"},
"i_CTRL-R_CTRL-O": {"d": "Insert register literally, without auto-indent", "cat": "Insert"},
"i_CTRL-R_CTRL-P": {"d": "Insert register literally and fix the indent", "cat": "Insert"},
"i_CTRL-W": {"d": "Delete the word before the cursor", "cat": "Insert", "n": "Neovim default: sets an undo point first, so <kbd>u</kbd> can bring the text back"},
"i_CTRL-U": {"d": "Delete text typed before the cursor (if none, all text before it)", "cat": "Insert", "n": "Neovim default: sets an undo point first, so <kbd>u</kbd> can bring the text back"},
"i_CTRL-H": {"d": "Delete the character before the cursor (same as <BS>)", "cat": "Insert"},
"i_<BS>": {"d": "Delete the character before the cursor", "cat": "Insert"},
"i_<Del>": {"d": "Delete the character under the cursor", "cat": "Insert"},
"i_CTRL-O": {"d": "Run one Normal-mode command, then return to Insert", "cat": "Insert", "n": "Handy for one-off moves: <kbd>&lt;C-o&gt;zz</kbd>, <kbd>&lt;C-o&gt;$</kbd>, <kbd>&lt;C-o&gt;p</kbd>"},
"i_CTRL-T": {"d": "Indent the current line one 'shiftwidth'", "cat": "Insert"},
"i_CTRL-D": {"d": "Dedent the current line one 'shiftwidth'", "cat": "Insert"},
"i_0_CTRL-D": {"d": "Delete all indent of the current line", "cat": "Insert"},
"i_CTRL-A": {"d": "Insert the text from the last Insert session", "cat": "Insert"},
"i_CTRL-@": {"d": "Insert the text from the last Insert session and leave Insert", "cat": "Insert"},
"i_CTRL-E": {"d": "Insert the character below the cursor", "cat": "Insert"},
"i_CTRL-Y": {"d": "Insert the character above the cursor", "cat": "Insert"},
"i_CTRL-V": {"d": "Insert the next key literally (e.g. a real <Tab>)", "cat": "Insert"},
"i_CTRL-Q": {"d": "Insert the next key literally (same as CTRL-V)", "cat": "Insert"},
"i_CTRL-V_digit": {"d": "Insert a character by code: 065, x41, u20ac, o101", "cat": "Insert"},
"i_CTRL-K": {"d": "Insert a digraph (e.g. <C-k>e: → ë, <C-k>Eu → €)", "cat": "Insert"},
"i_CTRL-G_u": {"d": "Start a new undoable change (undo break)", "cat": "Insert"},
"i_CTRL-G_U": {"d": "Don't start a new undo step for the next cursor movement", "cat": "Insert"},
"i_CTRL-G_j": {"d": "Down a line, to the column where Insert started", "cat": "Insert"},
"i_CTRL-G_k": {"d": "Up a line, to the column where Insert started", "cat": "Insert"},
"i_CTRL-]": {"d": "Expand an abbreviation without typing a character", "cat": "Insert"},
"i_<Insert>": {"d": "Toggle Insert / Replace mode", "cat": "Insert"},
"i_CTRL-\\_CTRL-N": {"d": "Go to Normal mode", "cat": "Insert"},
"i_CTRL-\\_CTRL-G": {"d": "Go to Normal mode", "cat": "Insert"},
"i_<Tab>": {"d": "Insert a tab (or spaces with 'expandtab')", "cat": "Insert", "n": "In buffers where blink.cmp is attached, <kbd>&lt;Tab&gt;</kbd> tries in order: next snippet placeholder, Sidekick next-edit suggestion, accept Copilot ghost text, else a normal Tab (<code>lua/plugins.lua:331-340</code>)"},
"i_CTRL-I": {"d": "Insert a tab (same as <Tab>)", "cat": "Insert"},
"i_<CR>": {"d": "Start a new line", "cat": "Insert"},
"i_CTRL-M": {"d": "Start a new line (same as <CR>)", "cat": "Insert"},
"i_CTRL-J": {"d": "Start a new line (same as <CR>)", "cat": "Insert"},
"i_<NL>": {"d": "Start a new line (same as <CR>)", "cat": "Insert"},
"i_CTRL-N": {"d": "Complete keyword: next match (sources from 'complete')", "cat": "Completion & AI", "n": "With blink.cmp's menu closed, <kbd>&lt;C-n&gt;</kbd>/<kbd>&lt;C-p&gt;</kbd> open blink's menu instead (first / last item selected). <kbd>&lt;C-x&gt;&lt;C-n&gt;</kbd> still runs built-in keyword completion"},
"i_CTRL-P": {"d": "Complete keyword: previous match", "cat": "Completion & AI"},
"i_CTRL-X": {"d": "Enter CTRL-X completion mode (next key picks the source)", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-F": {"d": "Complete file names", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-L": {"d": "Complete whole lines", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-O": {"d": "Omni completion ('omnifunc'; LSP when a client is attached)", "cat": "Completion & AI", "n": "Neovim sets 'omnifunc' to <code>vim.lsp.omnifunc</code> when an LSP attaches"},
"i_CTRL-X_CTRL-N": {"d": "Complete keywords from the current buffer (forward)", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-P": {"d": "Complete keywords from the current buffer (backward)", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-I": {"d": "Complete keywords from current and included files", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-D": {"d": "Complete defined identifiers (#define)", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-K": {"d": "Complete words from 'dictionary'", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-T": {"d": "Complete words from 'thesaurus'", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-]": {"d": "Complete tags", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-U": {"d": "Complete with 'completefunc'", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-V": {"d": "Complete Vim command-line text", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-R": {"d": "Complete from register contents", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-S": {"d": "Spelling suggestions", "cat": "Completion & AI"},
"i_CTRL-X_s": {"d": "Spelling suggestions", "cat": "Completion & AI"},
"i_CTRL-X_CTRL-Z": {"d": "Stop completion, keep the typed text", "cat": "Completion & AI"},
"complete_CTRL-Y": {"d": "Accept the selected completion", "cat": "Completion & AI"},
"complete_CTRL-E": {"d": "Cancel completion, restore the text", "cat": "Completion & AI"},
"c_CTRL-R": {"d": "Insert a register; <C-r><C-w> word, <C-r><C-a> WORD, <C-r><C-l> line", "cat": "Command line", "n": "<kbd>:%s/&lt;C-r&gt;&lt;C-w&gt;/</kbd> pre-fills a substitute for the word under the cursor"},
"c_CTRL-R_CTRL-O": {"d": "Insert a register or cursor object literally", "cat": "Command line"},
"c_<Tab>": {"d": "Complete the command or argument before the cursor", "cat": "Command line", "n": "In this config blink.cmp handles command-line completion: <kbd>&lt;Tab&gt;</kbd> opens its menu and inserts the first match (accepts a lone match), then cycles; <kbd>&lt;C-n&gt;</kbd>/<kbd>&lt;C-p&gt;</kbd> move, <kbd>&lt;C-y&gt;</kbd> accepts"},
"c_CTRL-I": {"d": "Complete before the cursor (same as <Tab>)", "cat": "Command line"},
"c_<S-Tab>": {"d": "Previous completion match", "cat": "Command line"},
"c_wildchar": {"d": "Complete before the cursor ('wildchar', <Tab>)", "cat": "Command line"},
"c_CTRL-N": {"d": "Next completion match, else next (newer) history entry", "cat": "Command line"},
"c_CTRL-P": {"d": "Previous completion match, else older history entry", "cat": "Command line"},
"c_<Up>": {"d": "Older history entry starting with the typed text", "cat": "Command line"},
"c_<Down>": {"d": "Newer history entry starting with the typed text", "cat": "Command line"},
"c_<S-Up>": {"d": "Older history entry", "cat": "Command line"},
"c_<S-Down>": {"d": "Newer history entry", "cat": "Command line"},
"c_CTRL-U": {"d": "Delete everything before the cursor", "cat": "Command line"},
"c_CTRL-W": {"d": "Delete the word before the cursor", "cat": "Command line"},
"c_CTRL-B": {"d": "Cursor to start of the command line", "cat": "Command line"},
"c_CTRL-E": {"d": "Cursor to end of the command line", "cat": "Command line"},
"c_CTRL-D": {"d": "List completions matching the text before the cursor", "cat": "Command line"},
"c_CTRL-A": {"d": "Insert all completion matches", "cat": "Command line"},
"c_CTRL-L": {"d": "Insert the longest common part of the matches", "cat": "Command line"},
"c_CTRL-G": {"d": "While typing a search: go to the next match ('incsearch')", "cat": "Command line"},
"c_CTRL-T": {"d": "While typing a search: go to the previous match ('incsearch')", "cat": "Command line"},
"c_CTRL-V": {"d": "Insert the next key literally (or a character code)", "cat": "Command line"},
"c_CTRL-K": {"d": "Insert a digraph", "cat": "Command line"},
"c_CTRL-\\_e": {"d": "Replace the command line with the result of {expr}", "cat": "Command line"},
"c_<Esc>": {"d": "Abandon the command line", "cat": "Command line"},
"c_CTRL-C": {"d": "Abandon the command line", "cat": "Command line"},
"c_<CR>": {"d": "Execute the command", "cat": "Command line"},
"c_CTRL-]": {"d": "Expand an abbreviation", "cat": "Command line"},
":buffer": {"cat": "Buffer & tab", "d": "Go to buffer N, or by (partial) name with Tab completion"},
":bNext": {"cat": "Buffer & tab"},
":ball": {"cat": "Buffer & tab"},
":badd": {"cat": "Buffer & tab"},
":balt": {"cat": "Buffer & tab"},
":bdelete": {"cat": "Buffer & tab", "d": "Unload a buffer and remove it from the list (closes its windows)", "n": "This config's <kbd>&lt;leader&gt;bd</kbd> uses Snacks.bufdelete, which keeps the window layout"},
":bfirst": {"cat": "Buffer & tab", "d": "Go to the first buffer"},
":blast": {"cat": "Buffer & tab", "d": "Go to the last buffer"},
":bmodified": {"cat": "Buffer & tab"},
":bnext": {"cat": "Buffer & tab", "d": "Go to the next buffer"},
":bprevious": {"cat": "Buffer & tab", "d": "Go to the previous buffer"},
":brewind": {"cat": "Buffer & tab"},
":bufdo": {"cat": "Buffer & tab", "d": "Run a command in every listed buffer"},
":buffers": {"cat": "Buffer & tab", "d": "List buffers (same as :ls)"},
":bunload": {"cat": "Buffer & tab"},
":bwipeout": {"cat": "Buffer & tab", "d": "Wipe a buffer completely (marks, options, everything)"},
":files": {"cat": "Buffer & tab", "d": "List buffers (same as :ls)"},
":ls": {"cat": "Buffer & tab", "d": "List buffers (% current, # alternate, + modified)"},
":sbuffer": {"cat": "Buffer & tab"},
":sbNext": {"cat": "Buffer & tab"},
":sball": {"cat": "Buffer & tab"},
":sbfirst": {"cat": "Buffer & tab"},
":sblast": {"cat": "Buffer & tab"},
":sbmodified": {"cat": "Buffer & tab"},
":sbnext": {"cat": "Buffer & tab"},
":sbprevious": {"cat": "Buffer & tab"},
":sbrewind": {"cat": "Buffer & tab"},
":unhide": {"cat": "Buffer & tab"},
":sunhide": {"cat": "Buffer & tab"},
":marks": {"cat": "Mark & jump", "d": "List marks"},
":jumps": {"cat": "Mark & jump", "d": "Show the jump list"},
":changes": {"cat": "Mark & jump", "d": "Show the change list"},
":k": {"cat": "Mark & jump"},
":mark": {"cat": "Mark & jump"},
":delmarks": {"cat": "Mark & jump", "d": "Delete marks (:delm a b, :delm! for all lowercase)"},
":clearjumps": {"cat": "Mark & jump", "d": "Clear the jump list"},
":keepjumps": {"cat": "Mark & jump", "d": "Run a command without changing the jump list"},
":keepmarks": {"cat": "Mark & jump"},
":lockmarks": {"cat": "Mark & jump"},
":registers": {"cat": "Register & macro", "d": "Show register contents (:reg a b for specific ones)", "n": "Register <code>d</code> holds deletes in this config"},
":display": {"cat": "Register & macro", "d": "Show register contents (same as :registers)"},
":@": {"cat": "Register & macro"},
":@@": {"cat": "Register & macro"},
":global": {"cat": "Edit", "d": "Run an Ex command on every line matching {pattern}: :g/pat/cmd", "n": "<code>:g/TODO/d</code> deletes matching lines; <code>:g/^/m0</code> reverses the file"},
":vglobal": {"cat": "Edit", "d": "Run an Ex command on every line NOT matching {pattern}: :v/pat/cmd"},
":normal": {"cat": "Edit", "d": "Run Normal-mode keys, on each line of [range]: :%norm A;", "n": "Use <code>:normal!</code> to ignore mappings (this config remaps d, c, x, j, k, s …)"},
":read": {"cat": "Files", "d": "Insert {file} (or :r !cmd output) below the cursor"},
":terminal": {"cat": "Terminal", "d": "Open a terminal buffer"},
":source": {"cat": "Misc", "d": "Run a Vim script or Lua file (:so % runs the current file)"},
":runtime": {"cat": "Misc"},
":packadd": {"cat": "Misc"},
":packloadall": {"cat": "Misc"},
":scriptnames": {"cat": "Misc"},
":scriptencoding": {"cat": "Misc"},
":finish": {"cat": "Misc"},
":debug": {"cat": "Misc"},
":debuggreedy": {"cat": "Misc"},
":breakadd": {"cat": "Misc"},
":breakdel": {"cat": "Misc"},
":breaklist": {"cat": "Misc"},
":profile": {"cat": "Misc"},
":profdel": {"cat": "Misc"},
":write": {"d": "Write the buffer to its file (or to {file})"},
":quit": {"d": "Close the window; exits Neovim when it is the last one"},
":wq": {"d": "Write and close the window"},
":xit": {"d": "Write only if changed, then close the window"},
":edit": {"d": "Edit {file}; with no argument, reload the current file"},
":enew": {"d": "Edit a new unnamed buffer"},
":substitute": {"d": "Find & replace: :[range]s/{pattern}/{string}/[flags]", "n": "Flags: <code>g</code> all on line, <code>c</code> confirm, <code>i</code>/<code>I</code> case, <code>n</code> count only. <code>&amp;</code> in {string} = whole match, <code>\\1</code> = group"},
":sort": {"d": "Sort lines in [range] (n numeric, i ignore case, u unique, r /pat/)"},
":uniq": {"d": "Remove adjacent duplicate lines in [range]"},
":earlier": {"d": "Go back in undo time: :earlier 10m, :earlier 3f (file writes)", "n": "'undofile' is on in this config, so this reaches back across sessions"},
":later": {"d": "Go forward in undo time (counterpart of :earlier)"},
":undolist": {"d": "List the leaves of the undo tree"},
":make": {"d": "Run 'makeprg' and load errors into the quickfix list"},
":cdo": {"d": "Run a command on each quickfix entry: :cdo s/a/b/ | update"},
":cfdo": {"d": "Run a command once per file in the quickfix list"},
":ldo": {"d": "Run a command on each location-list entry"},
":lfdo": {"d": "Run a command once per file in the location list"},
":windo": {"d": "Run a command in every window"},
":argdo": {"d": "Run a command on every file in the argument list"},
":split": {"d": "Split the window horizontally (optionally editing {file})"},
":vsplit": {"d": "Split the window vertically (optionally editing {file})"},
":new": {"d": "Open a new window with an empty buffer"},
":vnew": {"d": "Open a new vertical window with an empty buffer"},
":only": {"d": "Close all other windows"},
":close": {"d": "Close the current window"},
":tabnew": {"d": "Open a new tab page (optionally editing {file})"},
":tabedit": {"d": "Edit {file} in a new tab page"},
":tabclose": {"d": "Close the current tab page"},
":tabonly": {"d": "Close all other tab pages"},
":tabnext": {"d": "Go to the next tab page"},
":tabprevious": {"d": "Go to the previous tab page"},
":tabmove": {"d": "Move the tab page to position N (or +N / -N)"},
":nohlsearch": {"d": "Clear search highlighting until the next search"},
":help": {"d": "Open help for {subject} (:h i_CTRL-R, :h :s, :h 'wrap')"},
":copen": {"d": "Open the quickfix window"},
":cclose": {"d": "Close the quickfix window"},
":cwindow": {"d": "Open the quickfix window only if there are entries"},
":cnext": {"d": "Go to the next quickfix entry"},
":cprevious": {"d": "Go to the previous quickfix entry"},
":colder": {"d": "Go to the older quickfix list"},
":cnewer": {"d": "Go to the newer quickfix list"},
":vimgrep": {"d": "Search files into the quickfix list: :vim /pat/ **/*.lua"},
":grep": {"d": "Run 'grepprg' and load matches into the quickfix list"},
":saveas": {"d": "Save to {file} and make it the current file"},
":update": {"d": "Write only if the buffer was modified"},
":wall": {"d": "Write all modified buffers"},
":qall": {"d": "Quit Neovim (:qa! discards all changes)"},
":wqall": {"d": "Write all modified buffers and quit"},
":xall": {"d": "Write all modified buffers and quit"},
":move": {"d": "Move [range] lines below line {address}: :m+1, :m0"},
":copy": {"d": "Copy [range] lines below line {address}"},
":t": {"d": "Copy lines (same as :copy): :t. duplicates a line"},
":delete": {"d": "Delete [range] lines [into register]"},
":yank": {"d": "Yank [range] lines [into register]"},
":put": {"d": "Put a register linewise below the line (above with :put!)"},
":cd": {"d": "Change the global working directory"},
":lcd": {"d": "Change the working directory for this window"},
":tcd": {"d": "Change the working directory for this tab page"},
":pwd": {"d": "Show the working directory"},
":!": {"d": "Run a shell command; with a range, filter the lines through it"},
":lua": {"d": "Run Lua code: :lua print(vim.bo.filetype)"},
":=": {"d": "Print the last line number; := {expr} evaluates Lua (like :lua =)"},
":set": {"d": "Show or set options (:set wrap?, :set nowrap, :set sw=4)"},
":setlocal": {"d": "Set an option for this buffer/window only"},
":map": {"d": "Show or create mappings (:map with no args lists them)"},
":verbose": {"d": "Run a command verbosely; :verbose map x shows where x was set"},
":messages": {"d": "Show the message history"},
":checkhealth": {"d": "Run health checks (:checkhealth vim.lsp)"},
":diffthis": {"d": "Add this window to the diff"},
":diffoff": {"d": "Leave diff mode"},
":diffupdate": {"d": "Recompute the diff"},
":diffget": {"d": "Get the change from the other diff buffer"},
":diffput": {"d": "Put the change into the other diff buffer"},
":retab": {"d": "Convert tabs/spaces to match 'expandtab' / 'tabstop'"},
":&": {"d": "Repeat the last :substitute (:&& keeps the flags)"},
":restart": {"d": "Restart Neovim, restoring the session (:restart! does not)"},
":lsp": {"d": "Manage LSP: :lsp enable/disable/restart/stop [name]"},
":startinsert": {"d": "Start Insert mode"},
":stopinsert": {"d": "Stop Insert mode"},
":center": {"d": "Center lines in [range]"},
":right": {"d": "Right-align lines"},
":left": {"d": "Left-align lines"},
":join": {"d": "Join [range] lines"},
":oldfiles": {"d": "List recently edited files"},
":mksession": {"d": "Save the session (windows, buffers) to a file"},
":noautocmd": {"d": "Run a command without triggering autocommands"},
":silent": {"d": "Run a command without showing messages"},
":filter": {"d": "Filter the output of a listing command: :filter /pat/ ls"},
":redir": {"d": "Redirect messages to a file, register or variable"},
":wincmd": {"d": "Run a CTRL-W command: :wincmd l"},
":vertical": {"d": "Make the following split vertical: :vert help x"},
":tab": {"d": "Open the following command's window in a new tab: :tab help x"},
"n|q{0-9a-zA-Z\"}": {"d": "Record keystrokes into register {a-z} (A-Z appends)", "cat": "Register & macro", "n": "Press <kbd>q</kbd> again to stop; then <kbd>@a</kbd> plays it, <kbd>@@</kbd> / <kbd>Q</kbd> repeat"},
"n|q": {"d": "Stop recording (while recording a macro)", "cat": "Register & macro"},
"n|~": {"d": "Toggle case of N characters and move right", "cat": "Edit"},
"n|~{motion}": {"d": "Toggle case of {motion} text (only when 'tildeop' is set)", "cat": "Operator"},
"c|<C-F>": {"d": "Open the command-line window to edit the command", "cat": "Command line", "n": "Edit the command with Normal-mode keys. In this config <kbd>&lt;CR&gt;</kbd> in Normal mode starts Leap, so press <kbd>i</kbd> then <kbd>&lt;CR&gt;</kbd> to run the line"},
"i|<C-L>": {"d": "Completion menu: insert one more character from the current match", "cat": "Completion & AI"},
"i|other": {"d": "Completion menu: any other key stops completion and inserts itself", "cat": "Completion & AI"},
"n|g<MiddleMouse>": {"d": "Paste at the mouse click (same as <C-MiddleMouse>)", "cat": "Edit"}
},
"entries": [
{"k": "<C-\\><C-N>", "m": ["t"], "d": "Leave Terminal mode for Normal mode (scroll, search, yank output)", "s": "builtin", "cat": "Terminal", "h": "CTRL-\\_CTRL-N", "e": 1, "n": "Every key except <kbd>&lt;C-\\&gt;</kbd> goes to the job. Snacks terminals also accept a quick double <kbd>&lt;Esc&gt;</kbd>"},
{"k": "<C-\\><C-O>", "m": ["t"], "d": "Run one Normal-mode command, then return to Terminal mode", "s": "builtin", "cat": "Terminal", "h": "t_CTRL-\\_CTRL-O"},
{"k": "<C-\\>{char}", "m": ["t"], "d": "Send {char} to the job (the <C-\\> itself is not sent)", "s": "builtin", "cat": "Terminal", "h": "terminal-input", "n": "Only <kbd>&lt;C-n&gt;</kbd> and <kbd>&lt;C-o&gt;</kbd> after <kbd>&lt;C-\\&gt;</kbd> are handled by Neovim; <kbd>&lt;C-\\&gt;&lt;C-\\&gt;</kbd> sends one <kbd>&lt;C-\\&gt;</kbd>"},
{"k": "i", "m": ["n"], "d": "Enter Terminal mode (keys go to the shell / job)", "s": "builtin", "cat": "Terminal", "ctx": "terminal buffers", "h": "terminal-input", "e": 1, "n": "<kbd>a</kbd>, <kbd>I</kbd>, <kbd>A</kbd> and <code>:startinsert</code> do the same. Snacks terminals re-enter Terminal mode automatically when you switch back to them"},
{"k": "a", "m": ["n"], "d": "Enter Terminal mode (same as i)", "s": "builtin", "cat": "Terminal", "ctx": "terminal buffers", "h": "terminal-input"},
{"k": "[[", "m": ["n", "x", "o"], "d": "Jump to the previous shell prompt", "s": "neovim", "cat": "Terminal", "ctx": "terminal buffers", "h": "terminal-config", "n": "Neovim 0.12 buffer-local default; needs a shell that emits OSC 133 prompt marks. In Normal mode it wins over this config's global <kbd>[[</kbd>/<kbd>]]</kbd> (Snacks words)"},
{"k": "]]", "m": ["n", "x", "o"], "d": "Jump to the next shell prompt", "s": "neovim", "cat": "Terminal", "ctx": "terminal buffers", "h": "terminal-config"},
{"k": "<Esc><Esc>", "m": ["t"], "d": "Leave Terminal mode (two quick presses, within 200 ms)", "s": "snacks", "cat": "Terminal", "ctx": "Snacks terminal", "e": 1, "n": "A single <kbd>&lt;Esc&gt;</kbd> is still sent to the program (e.g. to leave vi-mode in the shell)"},
{"k": "<C-/>", "m": ["t"], "d": "Hide the terminal window (job keeps running)", "s": "snacks", "cat": "Terminal", "ctx": "Snacks terminal", "n": "Set in lua/plugins.lua (Snacks terminal win keys). From Normal mode the global <kbd>&lt;C-/&gt;</kbd> toggles it back; <kbd>2&lt;C-/&gt;</kbd> opens a second terminal"},
{"k": "q", "m": ["n"], "d": "Hide the terminal window", "s": "snacks", "cat": "Terminal", "ctx": "Snacks terminal"},
{"k": "gf", "m": ["n"], "d": "Hide the terminal and edit the file name under the cursor", "s": "snacks", "cat": "Terminal", "ctx": "Snacks terminal"},
{"k": "{char}", "m": ["s"], "d": "Typing replaces the selection and starts Insert mode", "s": "builtin", "cat": "Visual", "h": "Select-mode", "e": 1, "n": "Select mode is where snippet placeholders land. <b>Caveat:</b> this config maps d/D/c/C/x/X with <code>{\"n\",\"v\"}</code>, which includes Select mode, so typing those letters over a placeholder deletes it instead of replacing it"},
{"k": "<C-G>", "m": ["s"], "d": "Switch from Select to Visual mode", "s": "builtin", "cat": "Visual", "h": "v_CTRL-G"},
{"k": "<C-O>", "m": ["s"], "d": "Switch to Visual mode for one command", "s": "builtin", "cat": "Visual", "h": "v_CTRL-O"},
{"k": "<C-R>{register}", "m": ["s"], "d": "Pick the register that receives the replaced text", "s": "builtin", "cat": "Visual", "h": "v_CTRL-R"},
{"k": "<BS>", "m": ["s"], "d": "Delete the selection", "s": "builtin", "cat": "Visual", "h": "v_<BS>"},
{"k": "<Esc>", "m": ["s"], "d": "Stop Select mode", "s": "builtin", "cat": "Visual", "h": "Select-mode"},
{"k": "<C-R><C-W>", "m": ["c"], "d": "Insert the word under the cursor", "s": "builtin", "cat": "Command line", "h": "c_CTRL-R_CTRL-W", "e": 1},
{"k": "<C-R><C-A>", "m": ["c"], "d": "Insert the WORD under the cursor", "s": "builtin", "cat": "Command line", "h": "c_CTRL-R_CTRL-A"},
{"k": "<C-R><C-L>", "m": ["c"], "d": "Insert the line under the cursor", "s": "builtin", "cat": "Command line", "h": "c_CTRL-R_CTRL-L"},
{"k": "<C-R><C-F>", "m": ["c"], "d": "Insert the file name under the cursor", "s": "builtin", "cat": "Command line", "h": "c_CTRL-R_CTRL-F"},
{"k": "ZR", "m": ["n"], "d": "Restart Neovim and restore the session (:restart)", "s": "builtin", "cat": "Session", "h": "ZR", "n": "With a count 1-8 the session is not restored; 9 also skips the unsaved-changes check"}
],
"map_desc": [
{"s": "neovim", "m": "n", "k": "Y", "d": "Yank to end of line (y$)", "cat": "Edit", "e": 1, "force": true},
{"s": "neovim", "m": "n", "k": "&", "d": "Repeat last :s on this line, keeping its flags (:&&)", "cat": "Undo & repeat", "force": true},
{"s": "neovim", "m": "n", "k": "<C-L>", "d": "Clear search highlight, update diffs and redraw", "cat": "Search", "e": 1, "force": true},
{"s": "neovim", "m": "x", "k": "*", "d": "Search forward for the selected text", "cat": "Search", "e": 1, "force": true},
{"s": "neovim", "m": "x", "k": "#", "d": "Search backward for the selected text", "cat": "Search", "force": true},
{"s": "neovim", "m": "x", "k": "@", "d": "Linewise Visual: run macro {reg} on every selected line", "cat": "Register & macro", "n": "Only in linewise Visual (<kbd>V</kbd>); otherwise plain <kbd>@</kbd>", "force": true},
{"s": "neovim", "m": "x", "k": "Q", "d": "Linewise Visual: replay the last recorded macro on every line", "cat": "Register & macro", "force": true},
{"s": "neovim", "m": "i", "k": "<C-U>", "d": "Delete text before the cursor on this line (undo point first)", "cat": "Insert", "force": true},
{"s": "neovim", "m": "i", "k": "<C-W>", "d": "Delete the word before the cursor (undo point first)", "cat": "Insert", "force": true},
{"s": "neovim", "m": "n", "k": "[<Space>", "d": "Add N empty lines above the cursor (stay in Normal)", "cat": "Edit", "force": true},
{"s": "neovim", "m": "n", "k": "]<Space>", "d": "Add N empty lines below the cursor (stay in Normal)", "cat": "Edit", "force": true},
{"s": "neovim", "m": "n", "k": "[q", "d": "Previous quickfix entry (:cprevious)", "cat": "Quickfix & lists", "e": 1, "force": true},
{"s": "neovim", "m": "n", "k": "]q", "d": "Next quickfix entry (:cnext)", "cat": "Quickfix & lists", "e": 1, "force": true},
{"s": "neovim", "m": "n", "k": "[Q", "d": "First quickfix entry, or entry N (:crewind)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "]Q", "d": "Last quickfix entry, or entry N (:clast)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "[<C-Q>", "d": "Last entry in the previous file of the quickfix list (:cpfile)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "]<C-Q>", "d": "First entry in the next file of the quickfix list (:cnfile)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "[l", "d": "Previous location-list entry (:lprevious)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "]l", "d": "Next location-list entry (:lnext)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "[L", "d": "First location-list entry, or entry N (:lrewind)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "]L", "d": "Last location-list entry, or entry N (:llast)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "[<C-L>", "d": "Last entry in the previous file of the location list (:lpfile)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "]<C-L>", "d": "First entry in the next file of the location list (:lnfile)", "cat": "Quickfix & lists", "force": true},
{"s": "neovim", "m": "n", "k": "[a", "d": "Previous file in the argument list (:previous)", "cat": "Files", "force": true},
{"s": "neovim", "m": "n", "k": "]a", "d": "Next file in the argument list (:next)", "cat": "Files", "force": true},
{"s": "neovim", "m": "n", "k": "[A", "d": "First argument-list file, or file N (:rewind)", "cat": "Files", "force": true},
{"s": "neovim", "m": "n", "k": "]A", "d": "Last argument-list file, or file N (:last)", "cat": "Files", "force": true},
{"s": "neovim", "m": "n", "k": "[t", "d": "Previous matching tag (:tprevious)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "]t", "d": "Next matching tag (:tnext)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "[T", "d": "First matching tag, or tag N (:trewind)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "]T", "d": "Last matching tag, or tag N (:tlast)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "[<C-T>", "d": "Previous matching tag in the preview window (:ptprevious)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "]<C-T>", "d": "Next matching tag in the preview window (:ptnext)", "cat": "Tags", "force": true},
{"s": "neovim", "m": "n", "k": "[b", "d": "Previous buffer (:bprevious)", "cat": "Buffer & tab", "e": 1, "force": true},
{"s": "neovim", "m": "n", "k": "]b", "d": "Next buffer (:bnext)", "cat": "Buffer & tab", "e": 1, "force": true},
{"s": "neovim", "m": "n", "k": "[B", "d": "First buffer, or buffer N (:brewind)", "cat": "Buffer & tab", "force": true},
{"s": "neovim", "m": "n", "k": "]B", "d": "Last buffer, or buffer N (:blast)", "cat": "Buffer & tab", "force": true},
{"s": "neovim", "m": "n", "k": "[d", "d": "Previous diagnostic in this buffer", "cat": "LSP & diagnostics", "e": 1},
{"s": "neovim", "m": "n", "k": "]d", "d": "Next diagnostic in this buffer", "cat": "LSP & diagnostics", "e": 1},
{"s": "neovim", "m": "n", "k": "[D", "d": "First diagnostic in this buffer", "cat": "LSP & diagnostics"},
{"s": "neovim", "m": "n", "k": "]D", "d": "Last diagnostic in this buffer", "cat": "LSP & diagnostics"},
{"s": "neovim", "m": "n", "k": "<C-W>d", "d": "Show diagnostics under the cursor in a float", "cat": "LSP & diagnostics", "e": 1},
{"s": "neovim", "m": "n", "k": "<C-W><C-D>", "d": "Show diagnostics under the cursor in a float", "cat": "LSP & diagnostics"},
{"s": "neovim", "m": "n", "k": "grn", "d": "LSP: rename the symbol under the cursor", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "n", "k": "gra", "d": "LSP: code actions", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "x", "k": "gra", "d": "LSP: code actions for the selection", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "n", "k": "gri", "d": "LSP: go to implementation", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "n", "k": "grt", "d": "LSP: go to type definition", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "n", "k": "grx", "d": "LSP: run the code lens on this line", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "n", "k": "gO", "d": "Document outline: LSP symbols (or help / man / markdown headings)", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "i", "k": "<C-S>", "d": "LSP: show signature help", "cat": "LSP & diagnostics", "n": "blink.cmp's own signature help (<kbd>&lt;C-k&gt;</kbd>) is also enabled here", "force": true},
{"s": "neovim", "m": "s", "k": "<C-S>", "d": "LSP: show signature help", "cat": "LSP & diagnostics", "force": true},
{"s": "neovim", "m": "i", "k": "<Tab>", "d": "Jump to the next snippet placeholder, else insert <Tab>", "cat": "Completion & AI", "force": true},
{"s": "neovim", "m": "s", "k": "<Tab>", "d": "Jump to the next snippet placeholder, else <Tab>", "cat": "Completion & AI", "force": true},
{"s": "neovim", "m": "i", "k": "<S-Tab>", "d": "Jump to the previous snippet placeholder", "cat": "Completion & AI", "force": true},
{"s": "neovim", "m": "s", "k": "<S-Tab>", "d": "Jump to the previous snippet placeholder", "cat": "Completion & AI", "force": true},
{"s": "matchit", "m": "n", "k": "%", "d": "Jump to the matching bracket, if/else/endif or HTML tag", "cat": "Motion", "e": 1, "force": true},
{"s": "matchit", "m": "x", "k": "%", "d": "Extend the selection to the matching pair", "cat": "Motion", "force": true},
{"s": "matchit", "m": "o", "k": "%", "d": "Up to the matching pair (d%, y%)", "cat": "Motion", "force": true},
{"s": "matchit", "m": "n", "k": "g%", "d": "Jump backwards through the matching group", "cat": "Motion", "force": true},
{"s": "matchit", "m": "x", "k": "g%", "d": "Extend the selection backwards through the matching group", "cat": "Motion", "force": true},
{"s": "matchit", "m": "o", "k": "g%", "d": "Backwards through the matching group", "cat": "Motion", "force": true},
{"s": "matchit", "m": "n", "k": "[%", "d": "To the previous unmatched group start (like [{ for if/endif)", "cat": "Motion", "force": true},
{"s": "matchit", "m": "n", "k": "]%", "d": "To the next unmatched group end (like ]} for if/endif)", "cat": "Motion", "force": true},
{"s": "matchit", "m": "x", "k": "[%", "d": "Extend to the previous unmatched group start", "cat": "Motion", "force": true},
{"s": "matchit", "m": "x", "k": "]%", "d": "Extend to the next unmatched group end", "cat": "Motion", "force": true},
{"s": "matchit", "m": "o", "k": "[%", "d": "To the previous unmatched group start", "cat": "Motion", "force": true},
{"s": "matchit", "m": "o", "k": "]%", "d": "To the next unmatched group end", "cat": "Motion", "force": true},
{"s": "ftplugin", "m": "n", "k": "gO", "d": "Outline of the Markdown headings", "cat": "Notes", "force": true}
],
"notes": [
{"title": "The grammar: operator + count + motion", "kind": "tip", "lead": "Most editing is a sentence: a verb (operator) applied to a noun (motion or text object).", "rows": [["<kbd>d</kbd><kbd>w</kbd>", "delete to the next word"], ["<kbd>c</kbd><kbd>i</kbd><kbd>\"</kbd>", "change inside the quotes"], ["<kbd>y</kbd><kbd>a</kbd><kbd>p</kbd>", "yank a paragraph"], ["<kbd>g</kbd><kbd>U</kbd><kbd>i</kbd><kbd>w</kbd>", "uppercase the word"], ["<kbd>&gt;</kbd><kbd>i</kbd><kbd>B</kbd>", "indent the inside of a { } block"], ["<kbd>d</kbd><kbd>t</kbd><kbd>)</kbd>", "delete up to the next )"], ["<kbd>d</kbd><kbd>d</kbd> · <kbd>g</kbd><kbd>c</kbd><kbd>c</kbd>", "doubling the operator acts on the whole line"]], "note": "Learn one new operator and it works with every motion you already know.", "keys": ["d", "c", "y", "gU", ">", "gc"]},
{"title": "Counts and the dot", "kind": "tip", "lead": "A number in front repeats or scales; <kbd>.</kbd> repeats the last change.", "rows": [["<kbd>3</kbd><kbd>w</kbd> · <kbd>d</kbd><kbd>3</kbd><kbd>w</kbd> · <kbd>3</kbd><kbd>d</kbd><kbd>w</kbd>", "all the same: the count can go before the operator or the motion"], ["<kbd>5</kbd><kbd>j</kbd>", "5 real lines down (relative numbers are on in this config)"], ["<kbd>4</kbd><kbd>G</kbd> · <kbd>50</kbd><kbd>%</kbd>", "go to line 4 · go halfway through the file"], ["<kbd>.</kbd> · <kbd>3</kbd><kbd>.</kbd>", "repeat the last change · repeat it with count 3"], ["<kbd>*</kbd><kbd>c</kbd><kbd>g</kbd><kbd>n</kbd>…<kbd>.</kbd><kbd>.</kbd>", "change the word under the cursor, then each next match"], ["<kbd>q</kbd><kbd>a</kbd> … <kbd>q</kbd> · <kbd>10</kbd><kbd>@</kbd><kbd>a</kbd>", "record a macro, replay it 10 times (<kbd>Q</kbd> replays the last one)"]], "keys": [".", "@", "Q", "gn"]},
{"title": "Registers in this config", "kind": "tip", "lead": "Put <kbd>\"</kbd>{reg} before a yank, delete or put to choose where text goes.", "rows": [["<kbd>y</kbd> · <kbd>p</kbd>", "'clipboard' is unnamedplus: yank and put use the system clipboard"], ["<kbd>d</kbd> <kbd>c</kbd> <kbd>x</kbd> <kbd>D</kbd> <kbd>C</kbd> <kbd>X</kbd>", "mapped to <code>\"d</code>…: deleted text lands in register <code>d</code>, the clipboard stays clean"], ["<kbd>\"</kbd><kbd>d</kbd><kbd>p</kbd>", "paste what you just deleted"], ["<kbd>\"</kbd><kbd>0</kbd><kbd>p</kbd>", "paste the last yank"], ["<kbd>\"</kbd><kbd>_</kbd><kbd>d</kbd>…", "black hole register: in this config it is overridden by the <code>\"d</code> mapping, use <code>:normal! \"_d…</code>"], ["<kbd>&lt;C-r&gt;</kbd>{reg}", "insert a register in Insert or Command-line mode"], ["<kbd>:reg</kbd>", "show what every register holds"]], "note": "Because d/c/x are mappings that prepend <code>\"d</code>, any register you type before them is replaced by <code>d</code> (checked: <code>\"adiw</code> fills <code>\"d</code>, not <code>\"a</code>).", "keys": ["\"", "p", "d"]}
]
}