annotate runtime/syntax/rcs.vim @ 6472:22f95a018b13 v7.4.565

updated for version 7.4.565 Problem: Ranges for arguments, buffers, tabs, etc. are not checked to be valid but limited to the maximum. This can cause the wrong thing to happen. Solution: Give an error for an invalid value. (Marcin Szamotulski) Use windows range for ":wincmd".
author Bram Moolenaar <bram@vim.org>
date Wed, 07 Jan 2015 15:57:17 +0100
parents b37888de599c
children 43efa4f5a8ea
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
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
3 " Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " URL: https://github.com/hdima/vim-scripts/blob/master/syntax/rcs.vim
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
5 " Last Change: 2012-02-11
810
9f345c48220b updated for version 7.0c
vimboss
parents: 7
diff changeset
6 " Filenames: *,v
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
7 " Version: 1.12
810
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"