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