From 00a28570404cb7e7d29a203a74e428506fa5275f Mon Sep 17 00:00:00 2001 From: Jaehwang Jerry Jung Date: Sat, 12 Oct 2019 23:17:29 +0900 Subject: [PATCH] fix of vimscript quote by lemeb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 17bc0d0fe3bf88d1906faf6c1faed2641f399b84 Author: Léopold Mebazaa Date: Fri Oct 11 22:30:23 2019 -0400 Return to sanity commit b1c7fea82500d762471f939f6028f8fa8cc921cf Author: Léopold Mebazaa Date: Fri Oct 11 22:28:58 2019 -0400 Added logging for debug commit 562a72ea88e0aceeda8b20c1244fd038650d02c5 Author: Léopold Mebazaa Date: Fri Oct 11 18:57:41 2019 -0400 Hypothesis correct, turns out commit c126e3e98968c9cb291de1d3c80bbde099fa867f Author: Léopold Mebazaa Date: Fri Oct 11 18:53:32 2019 -0400 hypothesis 1: multiline is culprit commit 64966a9799551057c86d1d2292d5d5ab205acef9 Author: Léopold Mebazaa Date: Fri Oct 11 18:36:24 2019 -0400 Added log to debug AutoPairDelete()] commit 5f254b3c31980d4919be3f5f337b0c6fc252f9ff Author: Léopold Mebazaa Date: Fri Oct 11 12:51:49 2019 -0400 Update auto-pairs.vim --- plugin/auto-pairs.vim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index 8745397..9fafee4 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]'} \ } @@ -221,7 +224,7 @@ func! AutoPairsInsert(key) " when