Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 64 lines (55 sloc) 1.955 kb
3c8c441 @hdima Removed old SVN stuff
authored
1 " Vim syntax file
2 " Language: Bazaar (bzr) commit file
5e682b9 @hdima Updated email and URL for all scripts
authored
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
3c8c441 @hdima Removed old SVN stuff
authored
6 " Filenames: bzr_log.*
5e682b9 @hdima Updated email and URL for all scripts
authored
7 " Version: 1.2.2
0bee741 @hdima Added diff highlighting (needs review)
authored
8 "
9 " Thanks:
10 "
11 " Gioele Barabucci
12 " for idea of diff highlighting
3c8c441 @hdima Removed old SVN stuff
authored
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
533579f @hdima Added conditional diff highlighting
authored
22 if exists("bzr_highlight_diff")
23 syn include @Diff syntax/diff.vim
24 endif
0bee741 @hdima Added diff highlighting (needs review)
authored
25
3c8c441 @hdima Removed old SVN stuff
authored
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
533579f @hdima Added conditional diff highlighting
authored
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
3c8c441 @hdima Removed old SVN stuff
authored
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"
Something went wrong with that request. Please try again.