Optimize delete in pair
This commit is contained in:
parent
c6d9506de8
commit
f447d486c9
@ -99,7 +99,8 @@ function! AutoPairsDelete()
|
|||||||
if has_key(g:AutoPairs, prev_char)
|
if has_key(g:AutoPairs, prev_char)
|
||||||
let close = g:AutoPairs[prev_char]
|
let close = g:AutoPairs[prev_char]
|
||||||
if match(line,'^\s*'.close, col('.')-1) != -1
|
if match(line,'^\s*'.close, col('.')-1) != -1
|
||||||
return "\<Left>\<C-O>cf".close
|
let space = matchstr(line, '^\s*', col('.')-1)
|
||||||
|
return "\<BS>". repeat("\<DEL>", len(space)+1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user