Files
vim-matchup/after/ftplugin/javascriptreact_matchup.vim
Ezequiel Rodriguez 02b906cf77 Enable tagnameonly functionality for jsx files (#291)
* Enable tagnameonly functionality for jsx files

* tsxCloseString -> jsxCloseString

---------

Co-authored-by: Ezequiel Rodriguez <ezerodriguez@tesla.com>
2023-05-29 16:55:04 -04:00

26 lines
616 B
VimL

" vim match-up - even better matching
"
" Maintainer: Andy Massimino
" Email: a@normed.space
"
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
let b:match_skip = 's:\%(comment\|string\)\%(jsxCloseString\)\@<!'
if matchup#util#matchpref('tagnameonly', 0)
call matchup#util#patch_match_words('\)\%(', '\)\g{hlend}\%(')
call matchup#util#patch_match_words('\)\%(', '\)\g{hlend}\%(')
call matchup#util#patch_match_words('1>', '1\g{hlend}>')
call matchup#util#patch_match_words(':/>', ':/\g{hlend}>')
endif
let &cpo = s:save_cpo
" vim: sw=2