dev-environment-files/.config/nvim/lua/josean/plugins/substitute.lua
2024-04-03 11:08:26 -04:00

17 lines
586 B
Lua

return {
"gbprod/substitute.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local substitute = require("substitute")
substitute.setup()
-- set keymaps
local keymap = vim.keymap -- for conciseness
vim.keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
vim.keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
vim.keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
vim.keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
end,
}