runtime(git): Make diffs foldable
Commit:
https://github.com/vim/vim/commit/757714c0cba7772b987b2513559bcb74ce53ce3f
Author: Tim Pope <[email protected]>
Date: Thu Dec 28 12:47:31 2023 -0500
runtime(git): Make diffs foldable
diff --git a/runtime/syntax/git.vim b/runtime/syntax/git.vim
index bf013ce19..51eb8127d 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 <[email protected]>
-" 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\} .*/ 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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1rIytB-001GKW-6C%40256bit.org.