Mercurial > vim
annotate runtime/syntax/changelog.vim @ 18641:b288ef9327ac
Added tag v8.1.2312 for changeset b9240fe40dd407cb45b6f6ebf71eec74beec2c9b
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Nov 2019 16:30:04 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: generic ChangeLog file | |
3 " Written By: Gediminas Paulauskas <menesis@delfi.lt> | |
4 " Maintainer: Corinna Vinschen <vinschen@redhat.com> | |
5 " Last Change: June 1, 2003 | |
6 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 syn case ignore | |
13 | |
14 if exists('b:changelog_spacing_errors') | |
15 let s:spacing_errors = b:changelog_spacing_errors | |
16 elseif exists('g:changelog_spacing_errors') | |
17 let s:spacing_errors = g:changelog_spacing_errors | |
18 else | |
19 let s:spacing_errors = 1 | |
20 endif | |
21 | |
22 if s:spacing_errors | |
23 syn match changelogError "^ \+" | |
24 endif | |
25 | |
26 syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError | |
27 syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
28 syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
29 syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
30 syn match changelogFuncs contained "(.\{-})" extend |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
31 syn match changelogFuncs contained "\[.\{-}]" extend |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
32 syn match changelogColon contained ":" |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
33 |
7 | 34 syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError |
35 syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>" | |
36 syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec | |
37 syn keyword changelogDay contained mon tue wed thu fri sat sun | |
38 syn match changelogNumber contained "[.-]*[0-9]\+" | |
39 | |
40 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
549
diff
changeset
|
41 " Only when an item doesn't have highlighting yet |
7 | 42 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link changelogText Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
44 hi def link changelogBullet Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link changelogColon Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link changelogFiles Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 hi def link changelogFuncs Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link changelogHeader Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
49 hi def link changelogMail Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link changelogNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link changelogMonth Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
52 hi def link changelogDay Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
53 hi def link changelogError Folded |
7 | 54 |
55 | |
56 let b:current_syntax = "changelog" | |
57 | |
58 " vim: ts=8 |