diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index d8de91d..3919d95 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -96,7 +96,7 @@ function! AutoPairsExtend() endfunction function! AutoPairsMap(key) - execute 'inoremap '.a:key.' =AutoPairsInsert("\'.a:key.'")' + execute 'inoremap '.a:key.' =AutoPairsInsert("\'.a:key.'")' endfunction function! AutoPairsInit() @@ -107,15 +107,15 @@ function! AutoPairsInit() end let g:AutoPairsClosedPairs[close] = 1 endfor - execute 'inoremap =AutoPairsDelete()' + execute 'inoremap =AutoPairsDelete()' " If the keys map conflict with your own settings, delete or change them if g:AutoPairsShortcuts - execute 'inoremap :call AutoPairsJump()a' - execute 'inoremap ' - execute 'inoremap ' - execute 'inoremap =AutoPairsExtend()' + execute 'inoremap :call AutoPairsJump()a' + execute 'inoremap ' + execute 'inoremap ' + execute 'inoremap =AutoPairsExtend()' end endfunction -call AutoPairsInit() +au BufRead,BufNewFile * :call AutoPairsInit()