mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
runtime(jj): Support diffs in jj syntax
related: #16364 Signed-off-by: Gregory Anders <greg@gpanders.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
fc61cfd60e
commit
bde76da4d0
@ -6,7 +6,6 @@
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = 'jj'
|
||||
|
||||
syn match jjAdded "A .*" contained
|
||||
syn match jjRemoved "D .*" contained
|
||||
@ -14,7 +13,12 @@ syn match jjChanged "M .*" contained
|
||||
|
||||
syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged
|
||||
|
||||
syn include @jjCommitDiff syntax/diff.vim
|
||||
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff
|
||||
|
||||
hi def link jjComment Comment
|
||||
hi def link jjAdded Added
|
||||
hi def link jjRemoved Removed
|
||||
hi def link jjChanged Changed
|
||||
|
||||
let b:current_syntax = 'jj'
|
||||
|
Loading…
x
Reference in New Issue
Block a user