aboutsummaryrefslogtreecommitdiff
path: root/after/ftplugin
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-09-27 20:57:02 +0800
committerjdhao <jdhao@hotmail.com>2020-09-27 20:57:02 +0800
commit2d843076955b5978a9a6ce4ec1f647bdb1133275 (patch)
tree31c602a325fcaca3004bf42923303cb23877b48a /after/ftplugin
parent2a566f8d76a7e3f936cb200ccfb4ca0e66acb64f (diff)
use match(), replace obscure regex-match notation
Diffstat (limited to 'after/ftplugin')
-rw-r--r--after/ftplugin/tex.vim2
-rw-r--r--after/ftplugin/vim.vim2
2 files changed, 2 insertions, 2 deletions
diff --git a/after/ftplugin/tex.vim b/after/ftplugin/tex.vim
index 7de12d3..87281a6 100644
--- a/after/ftplugin/tex.vim
+++ b/after/ftplugin/tex.vim
@@ -1,5 +1,5 @@
" Only use the following character pairs for tex file
-if &runtimepath =~? 'auto-pairs'
+if match(&runtimepath, 'auto-pairs') != -1
let b:AutoPairs = AutoPairsDefine({'<' : '>'})
let b:AutoPairs = {'(':')', '[':']', '{':'}', '<':'>'}
endif
diff --git a/after/ftplugin/vim.vim b/after/ftplugin/vim.vim
index 4f92851..dcbb8e1 100644
--- a/after/ftplugin/vim.vim
+++ b/after/ftplugin/vim.vim
@@ -21,7 +21,7 @@ set shiftwidth=2 " number of spaces to use for autoindent
set expandtab " expand tab to spaces so that tabs are spaces
" Only define following variable if Auto-pairs plugin is used
-if &runtimepath =~? 'auto-pairs'
+if match(&runtimepath, 'auto-pairs') != -1
let b:AutoPairs = AutoPairsDefine({'<' : '>'})
" Do not use `"` for vim script since `"` is also used for comment