feat(nvim): add bindings for visual mode macro invocations
NOTE: This is implementing https://github.com/neovim/neovim/pull/26495 early. Once that is merged this is no longer needed.
This commit is contained in:
parent
2f46237981
commit
42dc2d822c
@ -105,6 +105,12 @@ M.setup = function()
|
||||
|
||||
-- Binding to allow shift tab dedent
|
||||
vim.keymap.set("i", "<S-Tab>", "<C-d>", { silent = true, desc = "Insert: Dedent" })
|
||||
|
||||
-- Allow macros to be invoked over a visual range via a keybind in visual mode
|
||||
vim.keymap.set("x", "@", "':normal! @'.getcharstr().'<CR>'",
|
||||
{ silent = true, expr = true, desc = "Call Macro Against Visual Selection" })
|
||||
vim.keymap.set("x", "Q", ':normal! @<C-R>=reg_recorded()<CR><CR>',
|
||||
{ silent = true, desc = "Call Last Macro Against Visual Selection" })
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -3,7 +3,7 @@ return {
|
||||
"chrisgrieser/nvim-various-textobjs",
|
||||
opts = {
|
||||
useDefaultKeymaps = true,
|
||||
disabledKeymaps = { "r", "R" },
|
||||
disabledKeymaps = { "r", "R", "Q" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user