Add configuration for mails

I do nearly all my mails with neomutt. So, I naturally edit mails with
vim (neovim to be precise). These settings add a couple of autocompletes
for very common mail-phrases. Furthermore I restrict the line-length of
my mails to 78 chars per line, since this is the recommended line-length
according to RFC-5322.

Reference: https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
This commit is contained in:
2026-03-24 20:29:02 +01:00
parent c97e8bebeb
commit 688143d0cc
2 changed files with 47 additions and 0 deletions

View File

@@ -132,6 +132,16 @@ vim.api.nvim_create_autocmd("FileType", {
vim.opt_local.colorcolumn = "72"
end,
})
-- mail
vim.api.nvim_create_autocmd("FileType", {
pattern = "mail",
group = configgroup,
callback = function()
-- https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
vim.opt_local.textwidth = 78
vim.opt_local.colorcolumn = "78"
end,
})
-- lua
vim.api.nvim_create_autocmd("FileType", {
pattern = "lua",

View File

@@ -0,0 +1,37 @@
snippet dearall English greeting
Dear Sir or Madam,
${0}
snippet dearmam English greeting females
Dear Ms. ${1},
${0}
snippet dearsir English greeting males
Dear Mr. ${1},
${0}
snippet kindly English mail closing
Kind regards
${0}
snippet sehrfrau German greeting females
Sehr geehrte Frau ${1},
${0}
snippet sehrherr German greeting males
Sehr geehrter Herr ${1},
${0}
snippet sehralle German greeting
Sehr geehrte Damen und Herren,
${0}
snippet mfg German mail closing
Mit freundlichen Grüßen
${0}