1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

use match(), replace obscure regex-match notation

This commit is contained in:
jdhao 2020-09-27 20:57:02 +08:00
parent 2a566f8d76
commit 2d84307695
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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