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:
@@ -132,6 +132,16 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||||||
vim.opt_local.colorcolumn = "72"
|
vim.opt_local.colorcolumn = "72"
|
||||||
end,
|
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
|
-- lua
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "lua",
|
pattern = "lua",
|
||||||
|
|||||||
37
.config/nvim/snippets/mail.snippets
Normal file
37
.config/nvim/snippets/mail.snippets
Normal 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}
|
||||||
Reference in New Issue
Block a user