changelog.vim (2097B)
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 7 " quit when a syntax file was already loaded 8 if exists("b:current_syntax") 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 28 syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend 29 syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend 30 syn match changelogFuncs contained "(.\{-})" extend 31 syn match changelogFuncs contained "\[.\{-}]" extend 32 syn match changelogColon contained ":" 33 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. 41 " Only when an item doesn't have highlighting yet 42 43 hi def link changelogText Normal 44 hi def link changelogBullet Type 45 hi def link changelogColon Type 46 hi def link changelogFiles Comment 47 hi def link changelogFuncs Comment 48 hi def link changelogHeader Statement 49 hi def link changelogMail Special 50 hi def link changelogNumber Number 51 hi def link changelogMonth Number 52 hi def link changelogDay Number 53 hi def link changelogError Folded 54 55 56 let b:current_syntax = "changelog" 57 58 " vim: ts=8