From 5f254b3c31980d4919be3f5f337b0c6fc252f9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9opold=20Mebazaa?= Date: Fri, 11 Oct 2019 12:51:49 -0400 Subject: [PATCH] Update auto-pairs.vim --- plugin/auto-pairs.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index af5eb32..b8ed0f1 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -21,9 +21,12 @@ func! AutoPairsDefaultPairs() if exists('b:autopairs_defaultpairs') return b:autopairs_defaultpairs end + " Added a more complex regex to capture in-line VimL comments + let no_quotes = '(\\\"|[^"])*' + let com_inl = '|^("'.no_quotes.'"*|[^"])* \zs"\ze'.no_quotes.'$' let r = copy(g:AutoPairs) let allPairs = { - \ 'vim': {'\v^\s*\zs"': ''}, + \ 'vim': {'\v^\s*\zs"'.com_inl: ''}, \ 'rust': {'\w\zs<': '>', '&\zs''': ''}, \ 'php': {'//k]', '//k]'} \ }