From 507ff15ea0e7ef924d24662fa53c234cb97359c9 Mon Sep 17 00:00:00 2001 From: Ruslan Kiyanchuk Date: Wed, 27 Mar 2019 11:08:34 -0700 Subject: [PATCH] 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. --- plugin/auto-pairs.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index af5eb32..220aaba 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -365,7 +365,7 @@ func! AutoPairsFastWrap() endf func! AutoPairsJump() - call search('["\]'')}]','W') + call search('[' . escape(join(values(b:AutoPairs), ''), "']") . ']', 'W') endf func! AutoPairsMoveCharacter(key)