From 88946623a7fd21fe7a1bb51d1d3cb7ca7b1bbb77 Mon Sep 17 00:00:00 2001 From: Simon Engmann Date: Wed, 15 Nov 2023 09:49:59 +0100 Subject: [PATCH 1/2] Support conflict-marker-size > 7 by default conflict-marker-size is a Git attribute that can be set on files to adjust the length of the conflict markers. This change adjusts the regular expressions to not match an exact length of 7, but rather a minimum length of 7. --- plugin/conflict_marker.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/conflict_marker.vim b/plugin/conflict_marker.vim index d8e1d80..4f9868d 100644 --- a/plugin/conflict_marker.vim +++ b/plugin/conflict_marker.vim @@ -10,10 +10,10 @@ function! s:var(name, default) endfunction call s:var('highlight_group', 'Error') -call s:var('begin', '^<<<<<<<') -call s:var('common_ancestors', '^|||||||') -call s:var('separator', '^=======$') -call s:var('end', '^>>>>>>>') +call s:var('begin', '^<\{7,}') +call s:var('common_ancestors', '^|\{7,}') +call s:var('separator', '^=\{7,}$') +call s:var('end', '^>\{7,}') call s:var('enable_mappings', 1) call s:var('enable_hooks', 1) call s:var('enable_highlight', 1) From 63a0a5b6eb04a4c1d4697852568a63d152751578 Mon Sep 17 00:00:00 2001 From: Simon Engmann Date: Wed, 15 Nov 2023 10:06:13 +0100 Subject: [PATCH 2/2] Update README for conflict-marker-size > 7 --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 27fb617..38df0cb 100644 --- a/README.md +++ b/README.md @@ -94,9 +94,10 @@ group, and define your own highlights for each syntax group. " disable the default highlight group let g:conflict_marker_highlight_group = '' -" Include text after begin and end markers -let g:conflict_marker_begin = '^<<<<<<< .*$' -let g:conflict_marker_end = '^>>>>>>> .*$' +" Include text after begin, common ancestor, and end markers +let g:conflict_marker_begin = '^<\{7,} .*$' +let g:conflict_marker_common_ancestors = '^|\{7,} .*$' +let g:conflict_marker_end = '^>\{7,} .*$' highlight ConflictMarkerBegin guibg=#2f7366 highlight ConflictMarkerOurs guibg=#2e5049