annotate runtime/syntax/gitcommit.vim @ 16194:3a5114768cfa v8.1.1102

patch 8.1.1102: Win32 exe file contains unused code commit https://github.com/vim/vim/commit/b26705afb55955306ffbe2a390e02fc052802b77 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 2 22:02:32 2019 +0200 patch 8.1.1102: Win32 exe file contains unused code Problem: Win32 exe file contains unused code. Solution: Remove unused #ifdefs and code. (Ken Takata, closes https://github.com/vim/vim/issues/4198)
author Bram Moolenaar <Bram@vim.org>
date Tue, 02 Apr 2019 22:15:04 +0200
parents 43efa4f5a8ea
children 5c40013d45ee
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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
5 " Last Change: 2016 Aug 29
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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
42
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
43 syn match gitcommitDiscardedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
44 syn match gitcommitSelectedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
45 syn match gitcommitUnmergedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
46 syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
47 syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
48 syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
49 syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
50 syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
51 syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
52
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
53 syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
54 syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
55 syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
56
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
57 hi def link gitcommitSummary Keyword
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
58 hi def link gitcommitComment Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
59 hi def link gitcommitUntracked gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
60 hi def link gitcommitDiscarded gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
61 hi def link gitcommitSelected gitcommitComment
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
62 hi def link gitcommitUnmerged gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
63 hi def link gitcommitOnBranch Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
64 hi def link gitcommitBranch Special
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
65 hi def link gitcommitNoBranch gitCommitBranch
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
66 hi def link gitcommitDiscardedType gitcommitType
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
67 hi def link gitcommitSelectedType gitcommitType
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
68 hi def link gitcommitUnmergedType gitcommitType
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
69 hi def link gitcommitType Type
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
70 hi def link gitcommitNoChanges gitcommitHeader
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
71 hi def link gitcommitHeader PreProc
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
72 hi def link gitcommitUntrackedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
73 hi def link gitcommitDiscardedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
74 hi def link gitcommitSelectedFile gitcommitFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
75 hi def link gitcommitUnmergedFile gitcommitFile
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
76 hi def link gitcommitFile Constant
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
77 hi def link gitcommitDiscardedArrow gitcommitArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
78 hi def link gitcommitSelectedArrow gitcommitArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
79 hi def link gitcommitUnmergedArrow gitcommitArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
80 hi def link gitcommitArrow gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
81 "hi def link gitcommitOverflow Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
82 hi def link gitcommitBlank Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
83
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
84 let b:current_syntax = "gitcommit"