diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim index f9329fc..6b018d7 100644 --- a/after/ftplugin/jsx.vim +++ b/after/ftplugin/jsx.vim @@ -11,9 +11,18 @@ if exists("loaded_matchit") let b:match_ignorecase = 0 let s:jsx_match_words = '(:),\[:\],{:},<:>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(/\@\|$\):<\@<=/\1>' - let b:match_words = exists('b:match_words') - \ ? b:match_words . ',' . s:jsx_match_words - \ : s:jsx_match_words + + if !exists('b:loaded_jsx_match_words') + let b:loaded_jsx_match_words = 0 + endif + + if b:loaded_jsx_match_words == 0 + let b:match_words = exists('b:match_words') + \ ? b:match_words . ',' . s:jsx_match_words + \ : s:jsx_match_words + endif + + let b:loaded_jsx_match_words = 1 endif setlocal suffixesadd+=.jsx