We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1249d42 commit d7ed1caCopy full SHA for d7ed1ca
autoload/hl_matchit.vim
@@ -124,10 +124,13 @@ function! hl_matchit#do_highlight()
124
let lcre = join(lcs, '\|')
125
let mw = split(b:match_words, ',\|:')
126
let mw = filter(mw, 'v:val !~ "^[(){}[\\]]$"')
127
+ if &filetype =~# 'html'
128
+ " hack to improve html
129
+ call insert(mw, '<\_[^>]\+>')
130
+ endif
131
let mwre = '\%(' . join(mw, '\|') . '\)'
132
let mwre = substitute(mwre, "'", "''", 'g')
- " final \& part of the regexp is a hack to improve html
- let pattern = '.*\%(' . lcre . '\).*\&' . mwre . '\&\%(<\_[^>]\+>\|.*\)'
133
+ let pattern = '.*\%(' . lcre . '\).*\&' . mwre
134
let b:hl_matchit_current_match_id =
135
\ matchadd(g:hl_matchit_hl_groupname, pattern, g:hl_matchit_hl_priority)
136
endif
0 commit comments