From 65a7237b2b2522ffb1fdcba59b2631042436186a Mon Sep 17 00:00:00 2001 From: Miao Jiang Date: Mon, 28 Mar 2016 03:11:14 +0800 Subject: [PATCH] Fixes #119, allow disabling mapping. --- plugin/auto-pairs.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index bce61fa..9ec759c 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -24,6 +24,11 @@ if !exists('g:AutoPairsMapBS') let g:AutoPairsMapBS = 1 end +" Map as the same BS +if !exists('g:AutoPairsMapCh') + let g:AutoPairsMapCh = 1 +end + if !exists('g:AutoPairsMapCR') let g:AutoPairsMapCR = 1 end @@ -437,9 +442,12 @@ function! AutoPairsInit() if g:AutoPairsMapBS " Use instead of for issue #14 sometimes press BS output strange words execute 'inoremap =AutoPairsDelete()' - execute 'inoremap =AutoPairsDelete()' end + if g:AutoPairsMapCh + execute 'inoremap =AutoPairsDelete()' + endif + if g:AutoPairsMapSpace " Try to respect abbreviations on a let do_abbrev = ""