fix close single quote incorrect
This commit is contained in:
parent
7e4614d6aa
commit
9d554d08be
@ -78,12 +78,6 @@ function! AutoPairsInsert(key)
|
|||||||
return a:key
|
return a:key
|
||||||
end
|
end
|
||||||
|
|
||||||
" Ignore ' if follows a word
|
|
||||||
if a:key == "'" && prev_char =~ '\v\w'
|
|
||||||
return a:key
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if !has_key(g:AutoPairs, a:key)
|
if !has_key(g:AutoPairs, a:key)
|
||||||
" Skip the character if next character is space
|
" Skip the character if next character is space
|
||||||
if current_char == ' ' && next_char == a:key
|
if current_char == ' ' && next_char == a:key
|
||||||
@ -116,6 +110,12 @@ function! AutoPairsInsert(key)
|
|||||||
return "\<Right>"
|
return "\<Right>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
" Ignore auto close ' if follows a word
|
||||||
|
" MUST after closed check. 'hello|'
|
||||||
|
if a:key == "'" && prev_char =~ '\v\w'
|
||||||
|
return a:key
|
||||||
|
end
|
||||||
|
|
||||||
return open.close."\<Left>"
|
return open.close."\<Left>"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user