X-Git-Url: https://git.madduck.net/etc/lazyvim.git/blobdiff_plain/150450bac462b56c175eb075c1915be2b2b81a83..f0708014115af01e71566bf9d49fe821047c162d:/.config/lazyvim/after/ftplugin/mail.lua?ds=sidebyside diff --git a/.config/lazyvim/after/ftplugin/mail.lua b/.config/lazyvim/after/ftplugin/mail.lua index 39eaf3e..176382c 100644 --- a/.config/lazyvim/after/ftplugin/mail.lua +++ b/.config/lazyvim/after/ftplugin/mail.lua @@ -23,6 +23,14 @@ vim.opt_local.formatoptions:remove("l") -- would not break lines that were long vim.opt_local.commentstring = "> %s" -- commenting means quoting in mails -- }}} +-- {{{ autocmds +vim.api.nvim_create_autocmd({ "BufWrite" }, { + buffer = 0, + group = vim.api.nvim_create_augroup("squashemptylines", { clear = true }), + command = [[%s/\v(\n)\n+$/\1/ge]], +}) +-- }}} + -- {{{ keymaps vim.keymap.set("n", "m", "", { buffer = true, desc = "mail functions" }) vim.keymap.set("n", "ms", "", { buffer = true, desc = "subject manipulation" })