From bab138ac3ccfdb02cec92d8e717d9df671214baf Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Fri, 20 Jul 2018 06:43:57 -0400 Subject: [PATCH] Allow switching regexp engine for filetypes --- after/ftplugin/tex_matchup.vim | 3 +++ autoload/matchup/loader.vim | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/after/ftplugin/tex_matchup.vim b/after/ftplugin/tex_matchup.vim index 43e194e..a10fc0d 100644 --- a/after/ftplugin/tex_matchup.vim +++ b/after/ftplugin/tex_matchup.vim @@ -74,6 +74,9 @@ function! s:setup_match_words() " the syntax method is too slow for latex let b:match_skip = 'r:\\\@ 0 ? '\%#='.l:eng : '' + for l:k in keys(s:sidedict) let l:re.delim_tex._engine_info.has_zs[l:k] \ = l:re.delim_tex[l:k] =~# g:matchup#re#zs @@ -465,7 +470,7 @@ function! s:init_delim_regexes() abort " {{{1 else " since these patterns are used in searchpos(), " be explicit about regex mode (set magic mode and ignorecase) - let l:re.delim_tex[l:k] = '\m' . l:ic . l:re.delim_tex[l:k] + let l:re.delim_tex[l:k] = l:eng . '\m' . l:ic . l:re.delim_tex[l:k] endif let l:re.delim_all[l:k] = l:re.delim_tex[l:k]