···65 end, { desc = "Show Recent Yanks" })
6667 -- Bind 1-n if `bind_indices` is set to a string
68- print(YB_OPTS.bind_indices or "no index keybind map set")
69 if YB_OPTS.bind_indices then
70 for i = 1, YB_OPTS.max_entries do
71- vim.keymap.set(
72- "n",
73- YB_OPTS.bind_indices .. i,
74- function()
75- helpers.smart_paste(YB_YANKS[i], YB_REG_TYPES[i], true)
76- end,
77- {
78- noremap = true,
79- silent = true,
80- desc = "Paste YankBank entry " .. i,
81- }
82- )
83 end
84 end
85end
···65 end, { desc = "Show Recent Yanks" })
6667 -- Bind 1-n if `bind_indices` is set to a string
068 if YB_OPTS.bind_indices then
69 for i = 1, YB_OPTS.max_entries do
70+ vim.keymap.set("n", YB_OPTS.bind_indices .. i, function()
71+ helpers.smart_paste(YB_YANKS[i], YB_REG_TYPES[i], true)
72+ end, {
73+ noremap = true,
74+ silent = true,
75+ desc = "Paste YankBank entry " .. i,
76+ })
0000077 end
78 end
79end