From 02b906cf772811a6845f2d5caaa81152beb65d6b Mon Sep 17 00:00:00 2001 From: Ezequiel Rodriguez Date: Mon, 29 May 2023 13:55:04 -0700 Subject: [PATCH] Enable tagnameonly functionality for jsx files (#291) * Enable tagnameonly functionality for jsx files * tsxCloseString -> jsxCloseString --------- Co-authored-by: Ezequiel Rodriguez --- after/ftplugin/javascriptreact_matchup.vim | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 after/ftplugin/javascriptreact_matchup.vim diff --git a/after/ftplugin/javascriptreact_matchup.vim b/after/ftplugin/javascriptreact_matchup.vim new file mode 100644 index 0000000..bc8d06b --- /dev/null +++ b/after/ftplugin/javascriptreact_matchup.vim @@ -0,0 +1,25 @@ +" 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\)\@', '1\g{hlend}>') + call matchup#util#patch_match_words(':/>', ':/\g{hlend}>') +endif + +let &cpo = s:save_cpo + +" vim: sw=2