Mercurial > vim
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 |
rev | line source |
---|---|
1624 | 1 " Vim syntax file |
2 " Language: git commit file | |
2034 | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
1624 | 4 " Filenames: *.git/COMMIT_EDITMSG |
18818 | 5 " Last Change: 2019 Dec 05 |
1624 | 6 |
7 if exists("b:current_syntax") | |
2202 | 8 finish |
1624 | 9 endif |
10 | |
11 syn case match | |
12 syn sync minlines=50 | |
13 | |
14 if has("spell") | |
2202 | 15 syn spell toplevel |
1624 | 16 endif |
17 | |
18 syn include @gitcommitDiff syntax/diff.vim | |
3465 | 19 syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff |
1624 | 20 |
18818 | 21 syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell |
1624 | 22 syn match gitcommitOverflow ".*" contained contains=@Spell |
23 syn match gitcommitBlank "^[^#].*" contained contains=@Spell | |
18818 | 24 |
25 if get(g:, "gitcommit_cleanup") is# "scissors" | |
26 syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl | |
27 syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff | |
28 else | |
29 syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl | |
30 syn match gitcommitComment "^#.*" | |
31 endif | |
32 | |
2034 | 33 syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent |
1624 | 34 syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite |
2034 | 35 syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite |
3465 | 36 syn match gitcommitBranch "[^ ']\+" contained |
2034 | 37 syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment |
1624 | 38 syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment |
2202 | 39 syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent |
2034 | 40 syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=gitcommitComment |
1624 | 41 |
42 syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold | |
43 syn match gitcommitUntrackedFile "\t\@<=.*" contained | |
44 | |
3465 | 45 syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold |
1624 | 46 syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold |
2034 | 47 syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold |
1624 | 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 | 53 syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow |
54 syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow | |
2034 | 55 syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow |
1624 | 56 syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile |
57 syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile | |
2034 | 58 syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile |
59 | |
60 syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl | |
61 syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained | |
62 syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$" | |
1624 | 63 |
64 hi def link gitcommitSummary Keyword | |
65 hi def link gitcommitComment Comment | |
66 hi def link gitcommitUntracked gitcommitComment | |
67 hi def link gitcommitDiscarded gitcommitComment | |
68 hi def link gitcommitSelected gitcommitComment | |
2034 | 69 hi def link gitcommitUnmerged gitcommitComment |
1624 | 70 hi def link gitcommitOnBranch Comment |
71 hi def link gitcommitBranch Special | |
2034 | 72 hi def link gitcommitNoBranch gitCommitBranch |
1624 | 73 hi def link gitcommitDiscardedType gitcommitType |
74 hi def link gitcommitSelectedType gitcommitType | |
2034 | 75 hi def link gitcommitUnmergedType gitcommitType |
1624 | 76 hi def link gitcommitType Type |
2034 | 77 hi def link gitcommitNoChanges gitcommitHeader |
1624 | 78 hi def link gitcommitHeader PreProc |
79 hi def link gitcommitUntrackedFile gitcommitFile | |
80 hi def link gitcommitDiscardedFile gitcommitFile | |
81 hi def link gitcommitSelectedFile gitcommitFile | |
2034 | 82 hi def link gitcommitUnmergedFile gitcommitFile |
1624 | 83 hi def link gitcommitFile Constant |
84 hi def link gitcommitDiscardedArrow gitcommitArrow | |
85 hi def link gitcommitSelectedArrow gitcommitArrow | |
2034 | 86 hi def link gitcommitUnmergedArrow gitcommitArrow |
1624 | 87 hi def link gitcommitArrow gitcommitComment |
88 "hi def link gitcommitOverflow Error | |
89 hi def link gitcommitBlank Error | |
90 | |
91 let b:current_syntax = "gitcommit" |