Merge pull request #49 from scottmcginness/master

Try to use space mapping without breaking abbreviations
This commit is contained in:
Miao Jiang 2013-05-21 05:54:28 -07:00
commit 4390981ccf

View File

@ -419,7 +419,12 @@ function! AutoPairsInit()
end
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
if g:AutoPairsShortcutFastWrap != ''