1121
|
1 " Vim syntax file
|
|
2 " Language: Bazaar (bzr) commit file
|
3356
|
3 " Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
|
4 " URL: https://github.com/hdima/vim-scripts/blob/master/syntax/bzr.vim
|
|
5 " Last Change: 2012-02-11
|
1121
|
6 " Filenames: bzr_log.*
|
3356
|
7 " Version: 1.2.2
|
2034
|
8 "
|
|
9 " Thanks:
|
|
10 "
|
|
11 " Gioele Barabucci
|
|
12 " for idea of diff highlighting
|
1121
|
13
|
|
14 " For version 5.x: Clear all syntax items.
|
|
15 " For version 6.x: Quit when a syntax file was already loaded.
|
|
16 if version < 600
|
|
17 syntax clear
|
|
18 elseif exists("b:current_syntax")
|
|
19 finish
|
|
20 endif
|
|
21
|
2034
|
22 if exists("bzr_highlight_diff")
|
|
23 syn include @Diff syntax/diff.vim
|
|
24 endif
|
|
25
|
1121
|
26 syn match bzrRemoved "^removed:$" contained
|
|
27 syn match bzrAdded "^added:$" contained
|
|
28 syn match bzrRenamed "^renamed:$" contained
|
|
29 syn match bzrModified "^modified:$" contained
|
|
30 syn match bzrUnchanged "^unchanged:$" contained
|
|
31 syn match bzrUnknown "^unknown:$" contained
|
2034
|
32 syn cluster Statuses contains=bzrRemoved,bzrAdded,bzrRenamed,bzrModified,bzrUnchanged,bzrUnknown
|
|
33 if exists("bzr_highlight_diff")
|
|
34 syn cluster Statuses add=@Diff
|
|
35 endif
|
|
36 syn region bzrRegion start="^-\{14} This line and the following will be ignored -\{14}$" end="\%$" contains=@NoSpell,@Statuses
|
1121
|
37
|
|
38 " Synchronization.
|
|
39 syn sync clear
|
|
40 syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1
|
|
41
|
|
42 " Define the default highlighting.
|
|
43 " For version 5.7 and earlier: only when not done already.
|
|
44 " For version 5.8 and later: only when an item doesn't have highlighting yet.
|
|
45 if version >= 508 || !exists("did_bzr_syn_inits")
|
|
46 if version <= 508
|
|
47 let did_bzr_syn_inits = 1
|
|
48 command -nargs=+ HiLink hi link <args>
|
|
49 else
|
|
50 command -nargs=+ HiLink hi def link <args>
|
|
51 endif
|
|
52
|
|
53 HiLink bzrRemoved Constant
|
|
54 HiLink bzrAdded Identifier
|
|
55 HiLink bzrModified Special
|
|
56 HiLink bzrRenamed Special
|
|
57 HiLink bzrUnchanged Special
|
|
58 HiLink bzrUnknown Special
|
|
59
|
|
60 delcommand HiLink
|
|
61 endif
|
|
62
|
|
63 let b:current_syntax = "bzr"
|