Mercurial > vim
annotate runtime/syntax/gitrebase.vim @ 33380:7ba7c38a9914
Added tag v9.0.1948 for changeset 7c9124711f997a267b94de49a7051f2f3294055c
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Sep 2023 22:30:04 +0200 |
parents | 3e661b0cf500 |
children |
rev | line source |
---|---|
1620 | 1 " Vim syntax file |
2 " Language: git rebase --interactive | |
2034 | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org> |
1620 | 4 " Filenames: git-rebase-todo |
27036 | 5 " Last Change: 2022 Jan 05 |
1620 | 6 |
7 if exists("b:current_syntax") | |
2202 | 8 finish |
1620 | 9 endif |
10 | |
11 syn case match | |
12 | |
27036 | 13 let s:c = escape((matchstr(getline('$'), '^[#;@!$%^&|:]\S\@!') . '#')[0], '^$.*[]~\"/') |
14 | |
15 syn match gitrebaseHash "\v<\x{7,}>" contained contains=@NoSpell | |
16 syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite contains=@NoSpell | |
1620 | 17 syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite |
2202 | 18 syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite |
1620 | 19 syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite |
20 syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite | |
2202 | 21 syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite |
3465 | 22 syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite |
18818 | 23 syn match gitrebaseBreak "\v^b%(reak)=>" |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
24 syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite |
18818 | 25 syn match gitrebaseNoop "\v^noop>" |
26 syn match gitrebaseMerge "\v^m(erge)=>" nextgroup=gitrebaseMergeOption,gitrebaseName skipwhite | |
27 syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite | |
18831 | 28 syn match gitrebaseReset "\v^(t|reset)=>" nextgroup=gitrebaseName skipwhite |
1620 | 29 syn match gitrebaseSummary ".*" contains=gitrebaseHash contained |
3465 | 30 syn match gitrebaseCommand ".*" contained |
27036 | 31 exe 'syn match gitrebaseComment " \@<=' . s:c . ' empty$" containedin=gitrebaseSummary contained' |
32 exe 'syn match gitrebaseComment "^\s*' . s:c . '.*" contains=gitrebaseHash' | |
2202 | 33 syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite |
18818 | 34 syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained |
35 syn match gitrebaseMergeCommit "\v<\x{7,}>" nextgroup=gitrebaseName skipwhite contained | |
36 syn match gitrebaseName "\v[^[:space:].*?i:^~/-]\S+" nextgroup=gitrebaseMergeComment skipwhite contained | |
27036 | 37 exe 'syn match gitrebaseMergeComment "' . s:c . '" nextgroup=gitrebaseSummary skipwhite contained' |
38 | |
39 unlet s:c | |
1620 | 40 |
41 hi def link gitrebaseCommit gitrebaseHash | |
42 hi def link gitrebaseHash Identifier | |
18818 | 43 hi def link gitrebasePick Type |
44 hi def link gitrebaseReword Conditional | |
1620 | 45 hi def link gitrebaseEdit PreProc |
18818 | 46 hi def link gitrebaseSquash Statement |
47 hi def link gitrebaseFixup Repeat | |
48 hi def link gitrebaseExec Operator | |
49 hi def link gitrebaseBreak Macro | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4681
diff
changeset
|
50 hi def link gitrebaseDrop Comment |
18818 | 51 hi def link gitrebaseNoop Comment |
52 hi def link gitrebaseMerge Exception | |
53 hi def link gitrebaseLabel Label | |
54 hi def link gitrebaseReset Keyword | |
1620 | 55 hi def link gitrebaseSummary String |
56 hi def link gitrebaseComment Comment | |
2034 | 57 hi def link gitrebaseSquashError Error |
18818 | 58 hi def link gitrebaseMergeCommit gitrebaseCommit |
59 hi def link gitrebaseMergeComment gitrebaseComment | |
60 hi def link gitrebaseName Tag | |
1620 | 61 |
62 let b:current_syntax = "gitrebase" |