dev-environment-files/.config/nvim/lua/josean/plugins/substitute.lua

18 lines
570 B
Lua
Raw Normal View History

2024-04-03 17:08:26 +02:00
return {
"gbprod/substitute.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local substitute = require("substitute")
substitute.setup()
-- set keymaps
local keymap = vim.keymap -- for conciseness
2024-04-24 10:15:55 +02:00
keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
2024-04-03 17:08:26 +02:00
end,
}