quick jump to the closed pair
{ | } (press } at |) { }|
This commit is contained in:
parent
6a4b2ca820
commit
d0fb9fe72b
@ -84,6 +84,16 @@ function! AutoPairsInsert(key)
|
||||
return "\<Right>\<Right>"
|
||||
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
|
||||
if current_char == a:key
|
||||
return "\<Right>"
|
||||
|
Loading…
Reference in New Issue
Block a user