diff options
author | Tim Pope <code@tpope.net> | 2023-12-28 12:47:31 -0500 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-12-28 23:17:54 +0100 |
commit | 757714c0cba7772b987b2513559bcb74ce53ce3f (patch) | |
tree | 69965d90e018c4799a70f1b484d18095fb06c5ac /runtime/syntax | |
parent | 48ddc6a6f86f1f42bdb49d308d72c15b0e90ce5a (diff) |
runtime(git): Make diffs foldable
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/git.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/syntax/git.vim b/runtime/syntax/git.vim index bf013ce195..51eb8127dd 100644 --- a/runtime/syntax/git.vim +++ b/runtime/syntax/git.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: generic git output " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2022 Jan 05 +" Last Change: 2023 Dec 28 if exists("b:current_syntax") finish @@ -38,7 +38,7 @@ syn match gitReflog /^\x\{40,\} \x\{40,\} .\{-\}\d\+\s-\d\{4\}\t.*/ skipwhite c syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff -syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff +syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff |