Try to use abbreviation before using space mapping

This commit is contained in:
Scott McGinness 2013-05-20 19:56:12 +01:00
parent 275b47353f
commit 1484f6501d

View File

@ -419,7 +419,12 @@ function! AutoPairsInit()
end end
if g:AutoPairsMapSpace if g:AutoPairsMapSpace
execute 'inoremap <buffer> <silent> <SPACE> <C-R>=AutoPairsSpace()<CR>' " Try to respect abbreviations on a <SPACE>
let do_abbrev = ""
if v:version >= 703 && has("patch489")
let do_abbrev = "<C-]>"
endif
execute 'inoremap <buffer> <silent> <SPACE> '.do_abbrev.'<C-R>=AutoPairsSpace()<CR>'
end end
if g:AutoPairsShortcutFastWrap != '' if g:AutoPairsShortcutFastWrap != ''