diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index 9ec759c..6c49487 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -148,8 +148,13 @@ function! AutoPairsInsert(key) " Fly Mode, and the key is closed-pairs, search closed-pair and jump if g:AutoPairsFlyMode && has_key(b:AutoPairsClosedPairs, a:key) + let n = stridx(after, a:key) + if n != -1 + return repeat(s:Right, n+1) + end if search(a:key, 'W') - return s:Right + " force break the '.' when jump to different line + return "\" endif endif