annotate runtime/syntax/gitcommit.vim @ 6849:f4e5704c5c43 v7.4.745

patch 7.4.745 Problem: The entries added by matchaddpos() are returned by getmatches() but can't be set with setmatches(). (Lcd) Solution: Fix setmatches(). (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Fri, 19 Jun 2015 16:32:57 +0200
parents 2eb30f341e8d
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
1 " Vim syntax file
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
2 " Language: git commit file
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
4 " Filenames: *.git/COMMIT_EDITMSG
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3465
diff changeset
5 " Last Change: 2013 May 30
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
6
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
7 if exists("b:current_syntax")
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
8 finish
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
9 endif
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
10
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
11 syn case match
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
12 syn sync minlines=50
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
13
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
14 if has("spell")
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
15 syn spell toplevel
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
16 endif
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
17
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
18 syn include @gitcommitDiff syntax/diff.vim
3465
161d01cbb165 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
19 syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
20
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
21 syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
22 syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
23 syn match gitcommitOverflow ".*" contained contains=@Spell
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
24 syn match gitcommitBlank "^[^#].*" contained contains=@Spell
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
25 syn match gitcommitComment "^#.*"
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
26 syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
27 syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
28 syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
3465
161d01cbb165 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
29 syn match gitcommitBranch "[^ ']\+" contained
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
30 syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
31 syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32 syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
33 syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
34
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
35 syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
36 syn match gitcommitUntrackedFile "\t\@<=.*" contained
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
37
3465
161d01cbb165 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
38 syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
39 syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
40 syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
41
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
42 syn match gitcommitDiscardedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
43 syn match gitcommitSelectedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
44 syn match gitcommitUnmergedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
45 syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
46 syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
47 syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
48 syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
49 syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
50 syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
51
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
52 syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
53 syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
54 syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
55
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
56 hi def link gitcommitSummary Keyword
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
57 hi def link gitcommitComment Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
58 hi def link gitcommitUntracked gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
59 hi def link gitcommitDiscarded gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
60 hi def link gitcommitSelected gitcommitComment
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
61 hi def link gitcommitUnmerged gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
62 hi def link gitcommitOnBranch Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
63 hi def link gitcommitBranch Special
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
64 hi def link gitcommitNoBranch gitCommitBranch
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
65 hi def link gitcommitDiscardedType gitcommitType
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
66 hi def link gitcommitSelectedType gitcommitType
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
67 hi def link gitcommitUnmergedType gitcommitType
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
68 hi def link gitcommitType Type
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
69 hi def link gitcommitNoChanges gitcommitHeader
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
70 hi def link gitcommitHeader PreProc
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
71 hi def link gitcommitUntrackedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
72 hi def link gitcommitDiscardedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
73 hi def link gitcommitSelectedFile gitcommitFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
74 hi def link gitcommitUnmergedFile gitcommitFile
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
75 hi def link gitcommitFile Constant
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
76 hi def link gitcommitDiscardedArrow gitcommitArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
77 hi def link gitcommitSelectedArrow gitcommitArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
78 hi def link gitcommitUnmergedArrow gitcommitArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
79 hi def link gitcommitArrow gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
80 "hi def link gitcommitOverflow Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
81 hi def link gitcommitBlank Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
82
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
83 let b:current_syntax = "gitcommit"