From af0eaee01737d26314c9c3618153e99d1eb3e2f1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 1 Jun 2021 18:17:40 +0200 Subject: Update --- syntax/gitcommit.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'syntax/gitcommit.vim') 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 -- cgit v1.2.3