From 151d3cdc2f82aff27f6b0db364aa6dfcfb8672a1 Mon Sep 17 00:00:00 2001 From: yemai Date: Mon, 17 Jun 2019 12:40:54 +0800 Subject: [PATCH] feat: add ftplugin to support matchit '%' usage for template tag --- ftplugin/vue.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ftplugin/vue.vim diff --git a/ftplugin/vue.vim b/ftplugin/vue.vim new file mode 100644 index 0000000..ccf44d2 --- /dev/null +++ b/ftplugin/vue.vim @@ -0,0 +1,12 @@ +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal matchpairs+=<:> + +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = '<:>,' . + \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . + \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . + \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' +endif