Fix AutoPairsJump for custom pairs

By default AutoPairsJump function is hardcoded for default pairs only,
so it doesn't work for custom pairs and misses '`'
(which is in default AutoPairs).

This commit modifies AutoPairsJump function to properly work with custom
defined pairs by using b:AutoPairs variable values, so that the function
will attempt to search for any closing pair that is configured.
This commit is contained in:
Ruslan Kiyanchuk 2019-03-27 11:08:34 -07:00
parent 39f06b873a
commit 507ff15ea0
No known key found for this signature in database
GPG Key ID: FAFCBE8AD9CD1CF9

View File

@ -365,7 +365,7 @@ func! AutoPairsFastWrap()
endf
func! AutoPairsJump()
call search('["\]'')}]','W')
call search('[' . escape(join(values(b:AutoPairs), ''), "']") . ']', 'W')
endf
func! AutoPairsMoveCharacter(key)