annotate runtime/syntax/rcs.vim @ 908:bd7e26d05a3f v7.0.034

updated for version 7.0-034
author vimboss
date Fri, 23 Jun 2006 15:59:09 +0000
parents 9f345c48220b
children 7bc41231fbc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
2 " Language: RCS file
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
3 " Maintainer: Dmitry Vasiliev <dima at hlabs dot spb dot ru>
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
4 " URL: http://www.hlabs.spb.ru/vim/rcs.vim
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
5 " Revision: $Id$
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
6 " Filenames: *,v
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
7 " Version: 1.11
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
8
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Options:
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
10 " rcs_folding = 1 For folding strings
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 5.x: Clear all syntax items.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 6.x: Quit when a syntax file was already loaded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " RCS file must end with a newline.
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
21 syn match rcsEOFError ".\%$" containedin=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Keywords.
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
24 syn keyword rcsKeyword head branch access symbols locks strict
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
25 syn keyword rcsKeyword comment expand date author state branches
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
26 syn keyword rcsKeyword next desc log
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
27 syn keyword rcsKeyword text nextgroup=rcsTextStr skipwhite skipempty
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Revision numbers and dates.
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
30 syn match rcsNumber "\<[0-9.]\+\>" display
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Strings.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if exists("rcs_folding") && has("folding")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Folded strings.
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
35 syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" fold contains=rcsSpecial
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
36 syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" fold contained contains=rcsSpecial,rcsDiffLines
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 else
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
38 syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" contains=rcsSpecial
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
39 syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" contained contains=rcsSpecial,rcsDiffLines
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 endif
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
41 syn match rcsSpecial "@@" contained
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
42 syn match rcsDiffLines "[da]\d\+ \d\+$" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Synchronization.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn sync clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if exists("rcs_folding") && has("folding")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " We have incorrect folding if following sync patterns is turned on.
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
50 syn sync match rcsSync grouphere rcsString "[0-9.]\+\(\s\|\n\)\+log\(\s\|\n\)\+@"me=e-1
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
51 syn sync match rcsSync grouphere rcsTextStr "@\(\s\|\n\)\+text\(\s\|\n\)\+@"me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.7 and earlier: only when not done already.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " For version 5.8 and later: only when an item doesn't have highlighting yet.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if version >= 508 || !exists("did_rcs_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version <= 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let did_rcs_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
65 HiLink rcsKeyword Keyword
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
66 HiLink rcsNumber Identifier
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
67 HiLink rcsString String
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
68 HiLink rcsTextStr String
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
69 HiLink rcsSpecial Special
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
70 HiLink rcsDiffLines Special
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
71 HiLink rcsEOFError Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 let b:current_syntax = "rcs"