diff options
Diffstat (limited to 'syntax/gitcommit.vim')
-rw-r--r-- | syntax/gitcommit.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index 1469bcbc..8e847650 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -26,7 +26,10 @@ syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLi syn match gitcommitOverflow ".*" contained contains=@Spell syn match gitcommitBlank "^[^#].*" contained contains=@Spell -if get(g:, "gitcommit_cleanup") is# "scissors" +syn match gitcommitTrailers "\n\@<=\n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*#\|\n*\%$\)\@=" +syn match gitcommitTrailerToken "^[[:alnum:]-]\+\s*:" contained containedin=gitcommitTrailers + +if get(b:, "gitcommit_cleanup", get(g:, "gitcommit_cleanup", "")) is# "scissors" syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff else @@ -67,6 +70,7 @@ syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$" hi def link gitcommitSummary Keyword +hi def link gitcommitTrailerToken Label hi def link gitcommitComment Comment hi def link gitcommitUntracked gitcommitComment hi def link gitcommitDiscarded gitcommitComment |