diff options
author | adrian5 <adrian5@users.noreply.github.com> | 2020-11-20 02:44:05 +0100 |
---|---|---|
committer | adrian5 <adrian5@users.noreply.github.com> | 2020-11-20 02:44:05 +0100 |
commit | 9e405c44b94872923be29c5e736d12d266155a4b (patch) | |
tree | b72f399d28d1260dd6645b749f29d679e0b74588 | |
parent | dee5dfd930293612f5a73eca64e0bde9a17eb6ed (diff) | |
download | rneovim-9e405c44b94872923be29c5e736d12d266155a4b.tar.gz rneovim-9e405c44b94872923be29c5e736d12d266155a4b.tar.bz2 rneovim-9e405c44b94872923be29c5e736d12d266155a4b.zip |
gitcommit.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b19f9b4de5df287797af87c4e3fba0a
-rw-r--r-- | runtime/syntax/gitcommit.vim | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim index 5e0642fbcc..63b1ce920f 100644 --- a/runtime/syntax/gitcommit.vim +++ b/runtime/syntax/gitcommit.vim @@ -2,7 +2,7 @@ " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.git/COMMIT_EDITMSG -" Last Change: 2016 Aug 29 +" Last Change: 2019 Dec 05 if exists("b:current_syntax") finish @@ -18,11 +18,18 @@ endif syn include @gitcommitDiff syntax/diff.vim syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff -syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl -syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell +syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell syn match gitcommitOverflow ".*" contained contains=@Spell syn match gitcommitBlank "^[^#].*" contained contains=@Spell -syn match gitcommitComment "^#.*" + +if get(g:, "gitcommit_cleanup") is# "scissors" + syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl + syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff +else + syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl + syn match gitcommitComment "^#.*" +endif + syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite |