From b1c7fea82500d762471f939f6028f8fa8cc921cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9opold=20Mebazaa?= Date: Fri, 11 Oct 2019 22:28:58 -0400 Subject: [PATCH] Added logging for debug --- plugin/auto-pairs.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index b5e98c9..2634370 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -212,11 +212,20 @@ func! AutoPairsInsert(key) return a:key end + echom "gline: ".string(s:getline()) " check open pairs for [open, close, opt] in b:AutoPairsList let ms = s:matchend(before.a:key, open) let m = matchstr(afterline, '^\v\s*\zs\V'.close) - if len(ms) > 0 + echom "beg?: ".string(matchstr(before.a:key, '\V'.open.'\v$')) + echom "pair: ".string([open, close, opt]) + echom "ms: ".string(ms) + echom "m: ".string(m) + echom "key: ".string(a:key) + " If the pair has no corresponding closing string, why bother + if close == '' + break + elseif len(ms) > 0 " process the open pair " remove inserted pair @@ -224,7 +233,7 @@ func! AutoPairsInsert(key) " when