7
|
1 " Vim syntax file
|
810
|
2 " Language: Subversion (svn) commit file
|
3356
|
3 " Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
|
4 " URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim
|
5466
|
5 " Last Change: 2013-11-08
|
810
|
6 " Filenames: svn-commit*.tmp
|
5466
|
7 " Version: 1.10
|
810
|
8
|
|
9 " Contributors:
|
5466
|
10 "
|
|
11 " List of the contributors in alphabetical order:
|
|
12 "
|
1698
|
13 " A. S. Budden
|
5466
|
14 " Ingo Karkat
|
3492
|
15 " Myk Taylor
|
5466
|
16 " Stefano Zacchiroli
|
7
|
17
|
|
18 " For version 5.x: Clear all syntax items.
|
|
19 " For version 6.x: Quit when a syntax file was already loaded.
|
|
20 if version < 600
|
|
21 syntax clear
|
|
22 elseif exists("b:current_syntax")
|
|
23 finish
|
|
24 endif
|
|
25
|
5466
|
26 syn spell toplevel
|
|
27
|
|
28 syn match svnFirstLine "\%^.*" nextgroup=svnRegion,svnBlank skipnl
|
|
29 syn match svnSummary "^.\{0,50\}" contained containedin=svnFirstLine nextgroup=svnOverflow contains=@Spell
|
|
30 syn match svnOverflow ".*" contained contains=@Spell
|
|
31 syn match svnBlank "^.*" contained contains=@Spell
|
3713
|
32
|
5466
|
33 syn region svnRegion end="\%$" matchgroup=svnDelimiter start="^--.*--$" contains=svnRemoved,svnRenamed,svnAdded,svnModified,svnProperty,@NoSpell
|
|
34 syn match svnRemoved "^D .*$" contained contains=@NoSpell
|
|
35 syn match svnRenamed "^R[ M][ U][ +] .*$" contained contains=@NoSpell
|
|
36 syn match svnAdded "^A[ M][ U][ +] .*$" contained contains=@NoSpell
|
|
37 syn match svnModified "^M[ M][ U] .*$" contained contains=@NoSpell
|
|
38 syn match svnProperty "^_M[ U] .*$" contained contains=@NoSpell
|
7
|
39
|
|
40 " Synchronization.
|
|
41 syn sync clear
|
810
|
42 syn sync match svnSync grouphere svnRegion "^--.*--$"me=s-1
|
7
|
43
|
|
44 " Define the default highlighting.
|
|
45 " For version 5.7 and earlier: only when not done already.
|
|
46 " For version 5.8 and later: only when an item doesn't have highlighting yet.
|
|
47 if version >= 508 || !exists("did_svn_syn_inits")
|
|
48 if version <= 508
|
|
49 let did_svn_syn_inits = 1
|
|
50 command -nargs=+ HiLink hi link <args>
|
|
51 else
|
|
52 command -nargs=+ HiLink hi def link <args>
|
|
53 endif
|
|
54
|
5466
|
55 HiLink svnSummary Keyword
|
|
56 HiLink svnBlank Error
|
|
57
|
810
|
58 HiLink svnRegion Comment
|
5466
|
59 HiLink svnDelimiter NonText
|
810
|
60 HiLink svnRemoved Constant
|
|
61 HiLink svnAdded Identifier
|
|
62 HiLink svnModified Special
|
|
63 HiLink svnProperty Special
|
3492
|
64 HiLink svnRenamed Special
|
7
|
65
|
|
66 delcommand HiLink
|
|
67 endif
|
|
68
|
|
69 let b:current_syntax = "svn"
|