Mercurial > vim
comparison runtime/syntax/mail.vim @ 34182:c57f1ae55bfb
runtime(mail): updated syntax file
Commit: https://github.com/vim/vim/commit/36e2c0f29332bd430f03c007be56fc6894f49923
Author: GI <gi1242@gmail.com>
Date: Tue Jan 23 19:46:30 2024 +0100
runtime(mail): updated syntax file
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Jan 2024 20:00:05 +0100 |
parents | 22da5ab9aaa1 |
children | 073a16d82b75 |
comparison
equal
deleted
inserted
replaced
34181:94a9edb82750 | 34182:c57f1ae55bfb |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Mail file | 2 " Language: Mail file |
3 " Previous Maintainer: Felix von Leitner <leitner@math.fu-berlin.de> | 3 " Previous Maintainer: Felix von Leitner <leitner@math.fu-berlin.de> |
4 " Maintainer: GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com' | 4 " Maintainer: GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com' |
5 " Last Change: Wed 14 Aug 2013 08:24:52 AM PDT | 5 " Last Change: Thu 18 Jan 2024 06:34:38 PM EST |
6 | 6 |
7 " Quit when a syntax file was already loaded | 7 " Quit when a syntax file was already loaded |
8 if exists("b:current_syntax") | 8 if exists("b:current_syntax") |
9 finish | 9 finish |
10 endif | 10 endif |
11 | 11 |
12 let s:cpo_save = &cpo | 12 let s:cpo_save = &cpo |
13 set cpo&vim | 13 set cpo&vim |
14 | |
15 syn spell toplevel | |
14 | 16 |
15 " The mail header is recognized starting with a "keyword:" line and ending | 17 " The mail header is recognized starting with a "keyword:" line and ending |
16 " with an empty line or other line that can't be in the header. All lines of | 18 " with an empty line or other line that can't be in the header. All lines of |
17 " the header are highlighted. Headers of quoted messages (quoted with >) are | 19 " the header are highlighted. Headers of quoted messages (quoted with >) are |
18 " also highlighted. | 20 " also highlighted. |
59 | 61 |
60 " URLs start with a known protocol or www,web,w3. | 62 " URLs start with a known protocol or www,web,w3. |
61 syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` | 63 syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` |
62 syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" | 64 syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" |
63 | 65 |
66 " Don't spell emojis | |
67 syn match mailEmoji contains=@NoSpell "\v[\U1f300-\U1f64f\U1f900-\U1f9ff]" | |
68 | |
64 " Make sure quote markers in regions (header / signature) have correct color | 69 " Make sure quote markers in regions (header / signature) have correct color |
65 syn match mailQuoteExp1 contained "\v^(\> ?)" | 70 syn match mailQuoteExp1 contained "\v^(\> ?)" |
66 syn match mailQuoteExp2 contained "\v^(\> ?){2}" | 71 syn match mailQuoteExp2 contained "\v^(\> ?){2}" |
67 syn match mailQuoteExp3 contained "\v^(\> ?){3}" | 72 syn match mailQuoteExp3 contained "\v^(\> ?){3}" |
68 syn match mailQuoteExp4 contained "\v^(\> ?){4}" | 73 syn match mailQuoteExp4 contained "\v^(\> ?){4}" |
84 syn sync minlines=100 | 89 syn sync minlines=100 |
85 endif | 90 endif |
86 | 91 |
87 " Define the default highlighting. | 92 " Define the default highlighting. |
88 hi def link mailVerbatim Special | 93 hi def link mailVerbatim Special |
89 hi def link mailHeader Statement | 94 hi def link mailHeader PreProc |
90 hi def link mailHeaderKey Type | 95 hi def link mailHeaderKey Type |
91 hi def link mailSignature PreProc | 96 hi def link mailSignature Comment |
92 hi def link mailHeaderEmail mailEmail | 97 hi def link mailHeaderEmail mailEmail |
93 hi def link mailEmail Special | 98 hi def link mailEmail String |
94 hi def link mailURL String | 99 hi def link mailURL Constant |
95 hi def link mailSubject Title | 100 hi def link mailSubject Statement |
96 hi def link mailQuoted1 Comment | 101 hi def link mailQuoted1 Function |
97 hi def link mailQuoted3 mailQuoted1 | 102 hi def link mailQuoted3 mailQuoted1 |
98 hi def link mailQuoted5 mailQuoted1 | 103 hi def link mailQuoted5 mailQuoted1 |
99 hi def link mailQuoted2 Identifier | 104 hi def link mailQuoted2 Identifier |
100 hi def link mailQuoted4 mailQuoted2 | 105 hi def link mailQuoted4 mailQuoted2 |
101 hi def link mailQuoted6 mailQuoted2 | 106 hi def link mailQuoted6 mailQuoted2 |