X-Git-Url: https://git.madduck.net/etc/lazyvim.git/blobdiff_plain/c9fb929a035238e0b4c702bf0e68729c433aedc9..8b10fec3cea6c9b671aa4c3c5d0f6125332c3f72:/.config/lazyvim/after/ftplugin/mail.lua diff --git a/.config/lazyvim/after/ftplugin/mail.lua b/.config/lazyvim/after/ftplugin/mail.lua index 36c6ead..f0b87eb 100644 --- a/.config/lazyvim/after/ftplugin/mail.lua +++ b/.config/lazyvim/after/ftplugin/mail.lua @@ -20,6 +20,23 @@ vim.opt_local.formatoptions:append("a") vim.opt_local.formatoptions:append("w") vim.opt_local.formatoptions:append("n") +vim.keymap.set("n", "m", "", { buffer = true, desc = "mail functions" }) +vim.keymap.set("n", "ms", "", { buffer = true, desc = "subject manipulation" }) + +vim.keymap.set( + "n", + "msn", + ":1,/^$/s,\\v(Subject:)\\s*((Re|AW):\\s*)*((.|\\_s\\s+)+),\\1 (was: \\4),e:set nohlsWhi", + -- set nohlsf li", + { buffer = true, desc = "make a new subject" } +) +vim.keymap.set( + "n", + "msd", + '1G/\\v^Subject:(.|\\_s\\s+)+was:/e:set nohls"_dab', + { buffer = true, desc = "remove old subjects" } +) + vim.keymap.set("n", "p", "", { buffer = true, desc = "mailplate profiles" }) vim.keymap.set(