7
|
1 " Vim syntax file
|
|
2 " Language: CVS RC File
|
|
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
|
|
4 " URL: http://www.pcppopper.org/syntax/pcp/cvsrc/
|
|
5 " Latest Revision: 2004-05-06
|
|
6 " arch-tag: 1910f2a8-66f4-4dde-9d1a-297566934535
|
|
7
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " strings
|
|
15 syn region cvsrcString start=+"+ skip=+\\\\\|\\\\"+ end=+"\|$+
|
|
16 syn region cvsrcString start=+'+ skip=+\\\\\|\\\\'+ end=+'\|$+
|
|
17
|
|
18 " numbers
|
|
19 syn match cvsrcNumber "\<\d\+\>"
|
|
20
|
|
21 " commands
|
|
22 syn match cvsrcBegin "^" nextgroup=cvsrcCommand skipwhite
|
|
23
|
|
24 syn region cvsrcCommand contained transparent matchgroup=cvsrcCommand start="add\|admin\|checkout\|commit\|cvs\|diff\|export\|history\|import\|init\|log\|rdiff\|release\|remove\|rtag\|status\|tag\|update" end="$" contains=cvsrcOption,cvsrcString,cvsrcNumber keepend
|
|
25
|
|
26 " options
|
|
27 syn match cvsrcOption "-\a\+"
|
|
28
|
|
29 " Define the default highlighting.
|
|
30 " For version 5.7 and earlier: only when not done already
|
|
31 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
32 if version >= 508 || !exists("did_cvsrc_syn_inits")
|
|
33 if version < 508
|
|
34 let did_cvsrc_syn_inits = 1
|
|
35 command -nargs=+ HiLink hi link <args>
|
|
36 else
|
|
37 command -nargs=+ HiLink hi def link <args>
|
|
38 endif
|
|
39
|
|
40 HiLink cvsrcString String
|
|
41 HiLink cvsrcNumber Number
|
|
42 HiLink cvsrcCommand Keyword
|
|
43 HiLink cvsrcOption Identifier
|
|
44 delcommand HiLink
|
|
45 endif
|
|
46
|
|
47 let b:current_syntax = "cvsrc"
|
|
48
|
|
49 " vim: set sts=2 sw=2:
|