diff --git a/rc/filetype/mail.kak b/rc/filetype/mail.kak index c99bd68f..9fb2d14e 100644 --- a/rc/filetype/mail.kak +++ b/rc/filetype/mail.kak @@ -4,6 +4,10 @@ hook global BufCreate .+\.eml %{ hook global WinSetOption filetype=mail %{ require-module mail + map buffer normal %{: diff-jump} + hook -once -always window WinSetOption filetype=.* %{ + unmap buffer normal %{: diff-jump} + } } hook -group mail-highlight global WinSetOption filetype=mail %{ @@ -14,6 +18,8 @@ hook -group mail-highlight global WinSetOption filetype=mail %{ provide-module mail %{ +require-module diff + add-highlighter shared/mail group add-highlighter shared/mail/ regex ^(From|To|Cc|Bcc|Subject|Reply-To|In-Reply-To|References|Date):([^\n]*(?:\n\h+[^\n]+)*)$ 1:keyword 2:attribute add-highlighter shared/mail/ regex <[^@>]+@.*?> 0:string