Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: CVS commit file |
| 3 | " Maintainer: Matt Dunford (zoot@zotikos.com) |
| 4 | " URL: http://www.zotikos.com/downloads/cvs.vim |
| 5 | " Last Change: Sat Nov 24 23:25:11 CET 2001 |
| 6 | |
| 7 | " For version 5.x: Clear all syntax items |
| 8 | " For version 6.x: Quit when a syntax file was already loaded |
| 9 | if version < 600 |
| 10 | syntax clear |
| 11 | elseif exists("b:current_syntax") |
| 12 | finish |
| 13 | endif |
| 14 | |
| 15 | syn region cvsLine start="^CVS: " end="$" contains=cvsFile,cvsCom,cvsFiles,cvsTag |
| 16 | syn match cvsFile contained " \t\(\(\S\+\) \)\+" |
| 17 | syn match cvsTag contained " Tag:" |
| 18 | syn match cvsFiles contained "\(Added\|Modified\|Removed\) Files:" |
| 19 | syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend keepend |
| 20 | syn match cvsDir contained "\S\+$" |
| 21 | |
| 22 | " Define the default highlighting. |
| 23 | " For version 5.7 and earlier: only when not done already |
| 24 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 25 | if version >= 508 || !exists("did_cvs_syn_inits") |
| 26 | if version < 508 |
| 27 | let did_cvs_syn_inits = 1 |
| 28 | command -nargs=+ HiLink hi link <args> |
| 29 | else |
| 30 | command -nargs=+ HiLink hi def link <args> |
| 31 | endif |
| 32 | |
| 33 | HiLink cvsLine Comment |
| 34 | HiLink cvsDir cvsFile |
| 35 | HiLink cvsFile Constant |
| 36 | HiLink cvsFiles cvsCom |
| 37 | HiLink cvsTag cvsCom |
| 38 | HiLink cvsCom Statement |
| 39 | |
| 40 | delcommand HiLink |
| 41 | endif |
| 42 | |
| 43 | let b:current_syntax = "cvs" |