feat: <leader>s<Esc> clears search; fix <C-M> cheatsheet label #14

Merged
rootiest merged 1 commits from feat/clear-search-leader-s-esc into main 2026-10-05 21:25:53 +00:00
3 changed files with 12 additions and 1 deletions
Showing only changes of commit 6884b57e67 - Show all commits

No files matched your search

+6 -1
View File
@@ -518,7 +518,7 @@ footer code { font-size: 0.8rem; }
<script>
"use strict";
const DATA = {"meta":{"version":"0.12.5+v0.12.5","leader":" ","localleader":"\\","date":"2026-10-05","plugins":["blink-copilot","blink.cmp","blink.lib","catppuccin","comment-box","conform","flash","focusline.nvim","friendly-snippets","gitsigns","grug-far","gx","haunt","inc-rename","kitty-scrollback","lazydev","leap","lualine","mason","mason-lspconfig","mini.ai","mini.pairs","mini.surround","noice","nui","nvim-lspconfig","nvim-treesitter-context","nvim-web-devicons","obsidian.nvim","persistence","qalc","sidekick","snacks","snacks-tea","undotree","vim-wakatime","which-key"],"options":{"undofile":true,"smartcase":false,"ignorecase":false,"relativenumber":true,"shiftwidth":2,"autowrite":true,"wrap":true,"clipboard":"unnamedplus","timeoutlen":1000},"timeoutlen":1000},"builtins":[{"k":"<C-@>","m":["i"],"d":"Insert the text from the last Insert session and leave Insert","s":"builtin","t":"i_CTRL-@","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-A>","m":["i"],"d":"Insert the text from the last Insert session","s":"builtin","t":"i_CTRL-A","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-C>","m":["i"],"d":"Leave Insert mode without abbreviations or InsertLeave","s":"builtin","t":"i_CTRL-C","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"n":"Skips InsertLeave autocmds, which plugins may rely on; prefer <kbd>&lt;Esc&gt;<\/kbd>"},{"k":"<C-D>","m":["i"],"d":"Dedent the current line one 'shiftwidth'","s":"builtin","t":"i_CTRL-D","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-E>","m":["i"],"d":"Insert the character below the cursor","s":"builtin","t":"i_CTRL-E","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><C-J>","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>j","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><Down>","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><C-K>","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>k","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><Up>","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>u","m":["i"],"d":"Start a new undoable change (undo break)","s":"builtin","t":"i_CTRL-G_u","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>U","m":["i"],"d":"Don't start a new undo step for the next cursor movement","s":"builtin","t":"i_CTRL-G_U","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<BS>","m":["i"],"d":"Delete the character before the cursor","s":"builtin","t":"i_<BS>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"ov":[{"m":"i","by":224},{"m":"i","by":245}]},{"k":"{char1}<BS>{char2}","m":["i"],"d":"enter digraph (only when 'digraph' option set)","s":"builtin","t":"i_digraph","h":"digraph.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-H>","m":["i"],"d":"Delete the character before the cursor (same as <BS>)","s":"builtin","t":"i_CTRL-H","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<Tab>","m":["i"],"d":"Insert a tab (or spaces with 'expandtab')","s":"builtin","t":"i_<Tab>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"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>)","ov":[{"m":"i","by":229}]},{"k":"<C-I>","m":["i"],"d":"Insert a tab (same as <Tab>)","s":"builtin","t":"i_CTRL-I","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<NL>","m":["i"],"d":"Start a new line (same as <CR>)","s":"builtin","t":"i_<NL>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-J>","m":["i"],"d":"Start a new line (same as <CR>)","s":"builtin","t":"i_CTRL-J","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-K>{char1}{char2}","m":["i"],"dLine truncated
const DATA = {"meta":{"version":"0.12.5+v0.12.5","leader":" ","localleader":"\\","date":"2026-10-05","plugins":["blink-copilot","blink.cmp","blink.lib","catppuccin","comment-box","conform","flash","focusline.nvim","friendly-snippets","gitsigns","grug-far","gx","haunt","inc-rename","kitty-scrollback","lazydev","leap","lualine","mason","mason-lspconfig","mini.ai","mini.pairs","mini.surround","noice","nui","nvim-lspconfig","nvim-treesitter-context","nvim-web-devicons","obsidian.nvim","persistence","qalc","sidekick","snacks","snacks-tea","undotree","vim-wakatime","which-key"],"options":{"shiftwidth":2,"smartcase":false,"ignorecase":false,"timeoutlen":1000,"clipboard":"unnamedplus","wrap":true,"relativenumber":true,"autowrite":true,"undofile":true},"timeoutlen":1000},"builtins":[{"k":"<C-@>","m":["i"],"d":"Insert the text from the last Insert session and leave Insert","s":"builtin","t":"i_CTRL-@","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-A>","m":["i"],"d":"Insert the text from the last Insert session","s":"builtin","t":"i_CTRL-A","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-C>","m":["i"],"d":"Leave Insert mode without abbreviations or InsertLeave","s":"builtin","t":"i_CTRL-C","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"n":"Skips InsertLeave autocmds, which plugins may rely on; prefer <kbd>&lt;Esc&gt;<\/kbd>"},{"k":"<C-D>","m":["i"],"d":"Dedent the current line one 'shiftwidth'","s":"builtin","t":"i_CTRL-D","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-E>","m":["i"],"d":"Insert the character below the cursor","s":"builtin","t":"i_CTRL-E","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><C-J>","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>j","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><Down>","m":["i"],"d":"Down a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_j","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><C-K>","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>k","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G><Up>","m":["i"],"d":"Up a line, to the column where Insert started","s":"builtin","t":"i_CTRL-G_k","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>u","m":["i"],"d":"Start a new undoable change (undo break)","s":"builtin","t":"i_CTRL-G_u","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-G>U","m":["i"],"d":"Don't start a new undo step for the next cursor movement","s":"builtin","t":"i_CTRL-G_U","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<BS>","m":["i"],"d":"Delete the character before the cursor","s":"builtin","t":"i_<BS>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"ov":[{"m":"i","by":225},{"m":"i","by":246}]},{"k":"{char1}<BS>{char2}","m":["i"],"d":"enter digraph (only when 'digraph' option set)","s":"builtin","t":"i_digraph","h":"digraph.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-H>","m":["i"],"d":"Delete the character before the cursor (same as <BS>)","s":"builtin","t":"i_CTRL-H","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<Tab>","m":["i"],"d":"Insert a tab (or spaces with 'expandtab')","s":"builtin","t":"i_<Tab>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null,"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>)","ov":[{"m":"i","by":230}]},{"k":"<C-I>","m":["i"],"d":"Insert a tab (same as <Tab>)","s":"builtin","t":"i_CTRL-I","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<NL>","m":["i"],"d":"Start a new line (same as <CR>)","s":"builtin","t":"i_<NL>","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-J>","m":["i"],"d":"Start a new line (same as <CR>)","s":"builtin","t":"i_CTRL-J","h":"insert.txt","sec":"Insert mode","cat":"Insert","mo":null,"ch":null,"ctx":null},{"k":"<C-K>{char1}{char2}","m":["i"],"dLine truncated
// ---- Basics -------------------------------------------------------------------
// Every DATA section is optional: missing pieces render as empty, never crash.
@@ -1292,6 +1292,11 @@ function infoFor(k, layer) {
const alt = lookup(layer.mode, [...prefix, CTRL_ALIAS[tok]]);
if (alt.primary || alt.kids.length) info = alt;
}
// Ctrl-M is Enter to the terminal, so a map on <CR> (leap) is what <C-M> really runs.
if (tok === "<C-M>") {
const cr = lookup(layer.mode, [...prefix, "<CR>"]);
if (cr.primary && cr.primary.kind === "live") info = cr;
}
info.tok = tok;
return info;
}
+5
View File
@@ -1293,6 +1293,11 @@ function infoFor(k, layer) {
const alt = lookup(layer.mode, [...prefix, CTRL_ALIAS[tok]]);
if (alt.primary || alt.kids.length) info = alt;
}
// Ctrl-M is Enter to the terminal, so a map on <CR> (leap) is what <C-M> really runs.
if (tok === "<C-M>") {
const cr = lookup(layer.mode, [...prefix, "<CR>"]);
if (cr.primary && cr.primary.kind === "live") info = cr;
}
info.tok = tok;
return info;
}
+1
View File
@@ -276,6 +276,7 @@ end, { expr = true, desc = "Rename Symbol" })
-- Other
vim.keymap.set("n", "<leader>ur", "<cmd>nohlsearch<cr>", { desc = "Clear Search Highlights" })
vim.keymap.set("n", "<leader>s<Esc>", "<cmd>let @/ = '' | nohlsearch<cr>", { desc = "Clear Search" })
vim.keymap.set("n", "<leader>z", function()
Snacks.zen()
end, { desc = "Toggle Zen Mode" })