mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-11-30 05:03:06 +08:00
quick jump to the closed pair
{
|
}
(press } at |)
{
}|
This commit is contained in:
@ -84,6 +84,16 @@ function! AutoPairsInsert(key)
|
|||||||
return "\<Right>\<Right>"
|
return "\<Right>\<Right>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
" Skip the character if next
|
||||||
|
if next_char == ''
|
||||||
|
let next_lineno = line('.')+1
|
||||||
|
let next_line = getline(nextnonblank(next_lineno))
|
||||||
|
let next_char = matchstr(next_line, '\s*\zs.')
|
||||||
|
if next_char == a:key
|
||||||
|
return "\<ESC>e^a"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
" Skip the character if current character is the same as input
|
" Skip the character if current character is the same as input
|
||||||
if current_char == a:key
|
if current_char == a:key
|
||||||
return "\<Right>"
|
return "\<Right>"
|
||||||
|
|||||||
Reference in New Issue
Block a user