home/rc/base/mail.kak
Maxime Coste fef0277998 Reorganise rc/ into subdirectories
* core: set of tools to work on kakoune source code
 * base: very common languages and tools
 * extra: less common languages and tools
2016-01-29 09:03:23 +00:00

10 lines
435 B
Plaintext

hook global BufSetOption mimetype=message/rfc822 %{ 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 global WinSetOption filetype=mail %{ addhl ref mail }
hook global WinSetOption filetype=(?!mail).* %{ rmhl mail }