This commit is contained in:
Adam Stankiewicz
2021-12-21 14:41:23 +01:00
parent 918610d427
commit 87a26c5bf1
154 changed files with 2479 additions and 2192 deletions

View File

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