annotate runtime/syntax/rcs.vim @ 367:7a6160fd08f7

updated for version 7.0095
author vimboss
date Mon, 27 Jun 2005 22:29:54 +0000
parents 3fc0f57ecb91
children 9f345c48220b
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: RCS file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.hlabs.spb.ru/vim/rcs.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: $Date$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Filenames: *,v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " $Revision$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Options:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " rcs_folding = 1 For folding strings
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.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match rcsEOFError ".\%$" containedin=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword rcsKeyword head branch access symbols locks strict
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword rcsKeyword comment expand date author state branches
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword rcsKeyword next desc log
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword rcsKeyword text nextgroup=rcsTextStr skipwhite skipempty
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.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match rcsNumber "\<[0-9.]\+\>" display
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.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" fold contains=rcsSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" fold contained contains=rcsSpecial,rcsDiffLines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" contains=rcsSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" contained contains=rcsSpecial,rcsDiffLines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match rcsSpecial "@@" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match rcsDiffLines "[da]\d\+ \d\+$" contained
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.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn sync match rcsSync grouphere rcsString "[0-9.]\+\(\s\|\n\)\+log\(\s\|\n\)\+@"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn sync match rcsSync grouphere rcsTextStr "@\(\s\|\n\)\+text\(\s\|\n\)\+@"me=e-1
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink rcsKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink rcsNumber Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink rcsString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink rcsTextStr String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink rcsSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink rcsDiffLines Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink rcsEOFError Error
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"