summaryrefslogtreecommitdiff
path: root/runtime/syntax/cvsrc.vim
blob: d55197950d1d970f4c52fd20bb11ece14685ac75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
" Vim syntax file
" Language:	    CVS RC File
" Maintainer:	    Nikolai Weibull <source@pcppopper.org>
" URL:		    http://www.pcppopper.org/syntax/pcp/cvsrc/
" Latest Revision:  2004-05-06
" arch-tag:	    1910f2a8-66f4-4dde-9d1a-297566934535

if version < 600
  syntax clear
elseif exists("b:current_syntax")
  finish
endif

" strings
syn region  cvsrcString	    start=+"+ skip=+\\\\\|\\\\"+ end=+"\|$+
syn region  cvsrcString	    start=+'+ skip=+\\\\\|\\\\'+ end=+'\|$+

" numbers
syn match   cvsrcNumber	    "\<\d\+\>"

" commands
syn match   cvsrcBegin	    "^" nextgroup=cvsrcCommand skipwhite

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

" options
syn match   cvsrcOption	    "-\a\+"

" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cvsrc_syn_inits")
  if version < 508
    let did_cvsrc_syn_inits = 1
    command -nargs=+ HiLink hi link <args>
  else
    command -nargs=+ HiLink hi def link <args>
  endif

  HiLink cvsrcString	String
  HiLink cvsrcNumber	Number
  HiLink cvsrcCommand	Keyword
  HiLink cvsrcOption	Identifier
  delcommand HiLink
endif

let b:current_syntax = "cvsrc"

" vim: set sts=2 sw=2: