Fix #239 extra space in quotes
This commit is contained in:
parent
b85ef9831e
commit
1c3f4c8171
@ -159,7 +159,7 @@ Options
|
||||
-------
|
||||
* g:AutoPairs
|
||||
|
||||
Default: {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`'}
|
||||
Default: {'(':')', '[':']', '{':'}',"'":"'",'"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"}
|
||||
|
||||
* b:AutoPairs
|
||||
|
||||
|
@ -13,7 +13,7 @@ end
|
||||
let g:AutoPairsLoaded = 1
|
||||
|
||||
if !exists('g:AutoPairs')
|
||||
let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '```':'```', '"""':'"""', "'''":"'''"}
|
||||
let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '```':'```', '"""':'"""', "'''":"'''", "`":"`"}
|
||||
end
|
||||
|
||||
if !exists('g:AutoPairsMapBS')
|
||||
@ -410,8 +410,12 @@ func! AutoPairsSpace()
|
||||
continue
|
||||
end
|
||||
if before =~ '\V'.open.'\v$' && after =~ '^\V'.close
|
||||
if close =~ '\v^[''"`]$'
|
||||
return "\<SPACE>"
|
||||
else
|
||||
return "\<SPACE>\<SPACE>".s:Left
|
||||
end
|
||||
end
|
||||
endfor
|
||||
return "\<SPACE>"
|
||||
endf
|
||||
|
Loading…
Reference in New Issue
Block a user