diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-12-29 00:28:54 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-12-29 00:54:09 +0100 |
commit | 419f0387276f6b1b72ad2cb56366f31d3ad6265e (patch) | |
tree | 4717c13bd4246e487974c533ab78903bf267ef8b /runtime/syntax/gitcommit.vim | |
parent | 1d71e1d987f330cae33f3d6026c26ffbb6c5b585 (diff) | |
download | rneovim-419f0387276f6b1b72ad2cb56366f31d3ad6265e.tar.gz rneovim-419f0387276f6b1b72ad2cb56366f31d3ad6265e.tar.bz2 rneovim-419f0387276f6b1b72ad2cb56366f31d3ad6265e.zip |
vim-patch:fda02d03c0cf
runtime(gitcommit): Updates to ftplugin and syntax
https://github.com/vim/vim/commit/fda02d03c0cfe017e465c58b3baf8b3106287578
Co-authored-by: Tim Pope <code@tpope.net>
Diffstat (limited to 'runtime/syntax/gitcommit.vim')
-rw-r--r-- | runtime/syntax/gitcommit.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim index 42c8d4414f..bce6772762 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: 2022 Jan 05 +" Last Change: 2023 Dec 28 if exists("b:current_syntax") finish @@ -21,7 +21,11 @@ endif syn include @gitcommitDiff syntax/diff.vim syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@gitcommitDiff -syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell +if get(g:, 'gitcommit_summary_length') < 0 + syn match gitcommitSummary "^.*$" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell +elseif get(g:, 'gitcommit_summary_length', 1) > 0 + exe 'syn match gitcommitSummary "^.*\%<' . (get(g:, 'gitcommit_summary_length', 50) + 1) . 'v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell' +endif syn match gitcommitOverflow ".*" contained contains=@Spell syn match gitcommitBlank "^.\+" contained contains=@Spell syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank,gitcommitComment skipnl |