diff options
author | Dan Reif <dan.reif@collectivehealth.com> | 2018-04-30 12:00:42 -0700 |
---|---|---|
committer | Dan Reif <dan.reif@collectivehealth.com> | 2018-04-30 12:00:42 -0700 |
commit | 3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed (patch) | |
tree | ce76003a08274cb805df101a44be8d37af1a4c4b /syntax/gitcommit.vim | |
parent | b4d7993e7ea554153025c5072749f415e69e0323 (diff) | |
download | vim-polyglot-3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed.tar.gz vim-polyglot-3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed.zip |
Update (periodic rebuild)
I originally meant to run this before adding haproxy, but accidentally
pushed that into my branch. If you'd like to see that content, it's at
https://github.com/CH-DanReif/vim-polyglot/commit/414ad25c3ad1ab9c4b6a99fe4f08d6c30b7e0f57.
Diffstat (limited to '')
-rw-r--r-- | syntax/gitcommit.vim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index 74477b27..8746a754 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -20,11 +20,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 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 |