annotate runtime/syntax/gitcommit.vim @ 23648:b7d3c79075c5 v8.2.2366

patch 8.2.2366: when using ":sleep" the cursor is always displayed Commit: https://github.com/vim/vim/commit/e2edc2ed4a9a229870b1e1811b0ecf045b84e429 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 20:21:23 2021 +0100 patch 8.2.2366: when using ":sleep" the cursor is always displayed Problem: When using ":sleep" the cursor is always displayed. Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner, closes #7688)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Jan 2021 20:30:04 +0100
parents 5c40013d45ee
children 3e661b0cf500
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
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
5 " Last Change: 2019 Dec 05
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
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
21 syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
22 syn match gitcommitOverflow ".*" contained contains=@Spell
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
23 syn match gitcommitBlank "^[^#].*" contained contains=@Spell
18818
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
24
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
25 if get(g:, "gitcommit_cleanup") is# "scissors"
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
26 syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
27 syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
28 else
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
29 syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
30 syn match gitcommitComment "^#.*"
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
31 endif
5c40013d45ee Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10048
diff changeset
32
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
33 syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
34 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
35 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
36 syn match gitcommitBranch "[^ ']\+" contained
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
37 syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
38 syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
39 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
40 syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
41
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
42 syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
43 syn match gitcommitUntrackedFile "\t\@<=.*" contained
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
44
3465
161d01cbb165 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2202
diff changeset
45 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
46 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
47 syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
48
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
49
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4681
diff changeset
50 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
51 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
52 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
53 syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
54 syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
55 syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
56 syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
57 syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
58 syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
59
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
60 syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
61 syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
62 syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
63
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
64 hi def link gitcommitSummary Keyword
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
65 hi def link gitcommitComment Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
66 hi def link gitcommitUntracked gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
67 hi def link gitcommitDiscarded gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
68 hi def link gitcommitSelected gitcommitComment
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
69 hi def link gitcommitUnmerged gitcommitComment
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
70 hi def link gitcommitOnBranch Comment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
71 hi def link gitcommitBranch Special
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
72 hi def link gitcommitNoBranch gitCommitBranch
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
73 hi def link gitcommitDiscardedType gitcommitType
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
74 hi def link gitcommitSelectedType gitcommitType
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
75 hi def link gitcommitUnmergedType gitcommitType
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
76 hi def link gitcommitType Type
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
77 hi def link gitcommitNoChanges gitcommitHeader
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
78 hi def link gitcommitHeader PreProc
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
79 hi def link gitcommitUntrackedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
80 hi def link gitcommitDiscardedFile gitcommitFile
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
81 hi def link gitcommitSelectedFile gitcommitFile
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
82 hi def link gitcommitUnmergedFile gitcommitFile
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
83 hi def link gitcommitFile Constant
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
84 hi def link gitcommitDiscardedArrow gitcommitArrow
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
85 hi def link gitcommitSelectedArrow gitcommitArrow
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
86 hi def link gitcommitUnmergedArrow gitcommitArrow
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
87 hi def link gitcommitArrow gitcommitComment
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
88 "hi def link gitcommitOverflow Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
89 hi def link gitcommitBlank Error
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
90
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
91 let b:current_syntax = "gitcommit"