mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 04:53:51 -05:00
Update
This commit is contained in:
@@ -60,8 +60,7 @@ if exists("*searchpairpos")
|
||||
endfunction
|
||||
|
||||
function! s:ignored_region()
|
||||
let name = s:syn_id_name()
|
||||
return (name =~? '\vstring|regex|comment|character') && (name !~# '^clojureCommentReaderMacro\(Form\)\?$')
|
||||
return s:syn_id_name() =~? '\vstring|regex|comment|character'
|
||||
endfunction
|
||||
|
||||
function! s:current_char()
|
||||
@@ -76,14 +75,10 @@ if exists("*searchpairpos")
|
||||
return s:current_char() =~# '\v[\(\)\[\]\{\}]' && !s:ignored_region()
|
||||
endfunction
|
||||
|
||||
" Returns 1 if string matches a pattern in 'patterns', which may be a
|
||||
" list of patterns, or a comma-delimited string of implicitly anchored
|
||||
" patterns.
|
||||
" Returns 1 if string matches a pattern in 'patterns', which should be
|
||||
" a list of patterns.
|
||||
function! s:match_one(patterns, string)
|
||||
let list = type(a:patterns) == type([])
|
||||
\ ? a:patterns
|
||||
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
|
||||
for pat in list
|
||||
for pat in a:patterns
|
||||
if a:string =~# pat | return 1 | endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user