refactor config to define all keybinds in a single file

This commit is contained in:
2024-11-03 17:53:39 -05:00
parent 91ef397420
commit 37969ca98e
11 changed files with 180 additions and 156 deletions
+2 -11
View File
@@ -1,17 +1,8 @@
return {
"gbprod/substitute.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local substitute = require("substitute")
substitute.setup()
local keymap = vim.keymap
keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
keymap.set("n", "S", substitute.line, { desc = "Substitute to end of line" })
keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
require("substitute").setup()
end,
}