fixes #24 when equalprg is setting AutoPairsReturn cannot work well

This commit is contained in:
Miao Jiang 2012-10-19 00:05:10 +08:00
parent 652175babc
commit 3c18515955

View File

@ -281,6 +281,13 @@ function! AutoPairsReturn()
" Use \<DEL> is a bit wierd. the character before cursor need to be deleted.
let cmd = " \<C-O>zz\<ESC>cl"
end
" If user has set equalprg, then avoid call =
" https://github.com/jiangmiao/auto-pairs/issues/24
if &equalprg != ''
return "\<ESC>O".cmd
endif
" conflict with javascript and coffee
" javascript need indent new line
" coffeescript forbid indent new line