home/rc/base/mail.kak
Maxime Coste 85cd27138d Remove mimetype option for good
file.kak now is responsible for mapping whatever mimetype file uses
to the filetype that Kakoune uses.

Fixes #975
Fixes #979
2016-12-14 13:40:00 +00:00

12 lines
464 B
Plaintext

hook global BufCreate .+\.eml %{
set buffer filetype mail
}
addhl -group / group mail
addhl -group /mail regex ^(From|To|Cc|Bcc|Subject|Reply-To|In-Reply-To):([^\n]*(?:\n\h+[^\n]+)*)$ 1:keyword 2:attribute
addhl -group /mail regex <[^@>]+@.*?> 0:string
addhl -group /mail regex ^>.*?$ 0:comment
hook -group mail-highlight global WinSetOption filetype=mail %{ addhl ref mail }
hook -group mail-highlight global WinSetOption filetype=(?!mail).* %{ rmhl mail }