xref: /vim-8.2.3635/runtime/syntax/svn.vim (revision 0fa313a7)
1" Vim syntax file
2" Language:	Subversion (svn) commit file
3" Maintainer:	Dmitry Vasiliev <[email protected]>
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.
10if version < 600
11  syntax clear
12elseif exists("b:current_syntax")
13  finish
14endif
15
16syn region svnRegion	start="--This line, and those below, will be ignored--" end="\%$" contains=ALL
17syn match svnRemoved	"^D    .*$" contained
18syn match svnAdded	"^A[ M]   .*$" contained
19syn match svnModified	"^M[ M]   .*$" contained
20syn match svnProperty	"^_M   .*$" contained
21
22" Synchronization.
23syn sync clear
24syn 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.
29if 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
44endif
45
46let b:current_syntax = "svn"
47