7
|
1 " Vim syntax file
|
|
2 " Language: Subversion (svn) commit file
|
|
3 " Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
|
|
4 " URL: http://www.hlabs.spb.ru/vim/svn.vim
|
|
5 " Last Change: $Date$
|
|
6 " $Revision$
|
|
7
|
|
8 " For version 5.x: Clear all syntax items.
|
|
9 " For version 6.x: Quit when a syntax file was already loaded.
|
|
10 if version < 600
|
|
11 syntax clear
|
|
12 elseif exists("b:current_syntax")
|
|
13 finish
|
|
14 endif
|
|
15
|
|
16 syn region svnRegion start="--This line, and those below, will be ignored--" end="\%$" contains=ALL
|
|
17 syn match svnRemoved "^D .*$" contained
|
|
18 syn match svnAdded "^A[ M] .*$" contained
|
|
19 syn match svnModified "^M[ M] .*$" contained
|
|
20 syn match svnProperty "^_M .*$" contained
|
|
21
|
|
22 " Synchronization.
|
|
23 syn sync clear
|
|
24 syn sync match svnSync grouphere svnRegion "--This line, and those below, will be ignored--"me=s-1
|
|
25
|
|
26 " Define the default highlighting.
|
|
27 " For version 5.7 and earlier: only when not done already.
|
|
28 " For version 5.8 and later: only when an item doesn't have highlighting yet.
|
|
29 if version >= 508 || !exists("did_svn_syn_inits")
|
|
30 if version <= 508
|
|
31 let did_svn_syn_inits = 1
|
|
32 command -nargs=+ HiLink hi link <args>
|
|
33 else
|
|
34 command -nargs=+ HiLink hi def link <args>
|
|
35 endif
|
|
36
|
|
37 HiLink svnRegion Comment
|
|
38 HiLink svnRemoved Constant
|
|
39 HiLink svnAdded Identifier
|
|
40 HiLink svnModified Special
|
|
41 HiLink svnProperty Special
|
|
42
|
|
43 delcommand HiLink
|
|
44 endif
|
|
45
|
|
46 let b:current_syntax = "svn"
|