xref: /vim-8.2.3635/runtime/syntax/changelog.vim (revision f37506f6)
1" Vim syntax file
2" Language:	generic ChangeLog file
3" Written By:	Gediminas Paulauskas <[email protected]>
4" Maintainer:	Corinna Vinschen <[email protected]>
5" Last Change:	June 1, 2003
6
7" quit when a syntax file was already loaded
8if exists("b:current_syntax")
9  finish
10endif
11
12syn case ignore
13
14if exists('b:changelog_spacing_errors')
15  let s:spacing_errors = b:changelog_spacing_errors
16elseif exists('g:changelog_spacing_errors')
17  let s:spacing_errors = g:changelog_spacing_errors
18else
19  let s:spacing_errors = 1
20endif
21
22if s:spacing_errors
23  syn match	changelogError "^ \+"
24endif
25
26syn match	changelogText	"^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError
27syn match	changelogHeader	"^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail
28syn region	changelogFiles	start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
29syn region	changelogFiles	start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
30syn match	changelogFuncs  contained "(.\{-})" extend
31syn match	changelogFuncs  contained "\[.\{-}]" extend
32syn match	changelogColon	contained ":"
33
34syn match	changelogBullet	contained "^\s\+[+*]\s" contains=changelogError
35syn match	changelogMail	contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>"
36syn keyword	changelogMonth	contained jan feb mar apr may jun jul aug sep oct nov dec
37syn keyword	changelogDay	contained mon tue wed thu fri sat sun
38syn match	changelogNumber	contained "[.-]*[0-9]\+"
39
40" Define the default highlighting.
41" Only when an item doesn't have highlighting yet
42
43hi def link changelogText		Normal
44hi def link changelogBullet	Type
45hi def link changelogColon		Type
46hi def link changelogFiles		Comment
47hi def link changelogFuncs	Comment
48hi def link changelogHeader	Statement
49hi def link changelogMail		Special
50hi def link changelogNumber	Number
51hi def link changelogMonth		Number
52hi def link changelogDay		Number
53hi def link changelogError		Folded
54
55
56let b:current_syntax = "changelog"
57
58" vim: ts=8
59