From: martin f. krafft Date: Mon, 28 Apr 2025 15:53:34 +0000 (+0200) Subject: add mail functions for subject manipulation X-Git-Url: https://git.madduck.net/etc/lazyvim.git/commitdiff_plain/8b10fec3cea6c9b671aa4c3c5d0f6125332c3f72?ds=sidebyside add mail functions for subject manipulation --- 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(