diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index af5eb32..6a15289 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -334,7 +334,7 @@ endf " Fast wrap the word in brackets -func! AutoPairsFastWrap() +func! AutoPairsFastWrap(movement) let c = @" normal! x let [before, after, ig] = s:getline() @@ -354,7 +354,7 @@ func! AutoPairsFastWrap() end endfor if after[1:1] =~ '\v\w' - normal! e + execute "normal! ".a:movement normal! p else normal! p @@ -559,7 +559,7 @@ func! AutoPairsInit() end if g:AutoPairsShortcutFastWrap != '' - execute 'inoremap '.g:AutoPairsShortcutFastWrap.' =AutoPairsFastWrap()' + execute 'inoremap '.g:AutoPairsShortcutFastWrap.' =AutoPairsFastWrap("e")' end if g:AutoPairsShortcutBackInsert != ''