diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index 9daa1b7..2c1f6c2 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -187,6 +187,51 @@ func! AutoPairsInsert(key) return a:key end + " check open pairs + for [open, close, opt] in b:AutoPairsList + let ms = s:matchend(before.a:key, open) + if len(ms) > 0 + " process the open pair + + " remove inserted pair + " eg: if the pairs include < > and + " when - " when