summaryrefslogtreecommitdiffstats
path: root/after/ftplugin/jsx.vim
blob: 380d476bfb4fa929679f143304d906717f8d176a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1
  
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim ftplugin file
"
" Language: JSX (JavaScript)
" Maintainer: Max Wang <mxawng@gmail.com>
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" modified from html.vim
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
endif

setlocal suffixesadd+=.jsx

endif