diff options
Diffstat (limited to 'runtime/ftplugin/heex.vim')
-rw-r--r-- | runtime/ftplugin/heex.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/ftplugin/heex.vim b/runtime/ftplugin/heex.vim index 5274d59fbf..becc071c37 100644 --- a/runtime/ftplugin/heex.vim +++ b/runtime/ftplugin/heex.vim @@ -14,3 +14,14 @@ setlocal comments=:<%!-- setlocal commentstring=<%!--\ %s\ --%> let b:undo_ftplugin = 'set sw< sts< et< com< cms<' + +" HTML: thanks to Johannes Zellner and Benji Fisher. +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 1 + let b:match_words = '<%\{-}!--:--%\{-}>,' .. + \ '<:>,' .. + \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .. + \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .. + \ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" +endif |