mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Enable tagnameonly functionality for jsx files (#291)
* Enable tagnameonly functionality for jsx files * tsxCloseString -> jsxCloseString --------- Co-authored-by: Ezequiel Rodriguez <ezerodriguez@tesla.com>
This commit is contained in:
committed by
GitHub
parent
b8eca3b588
commit
02b906cf77
25
after/ftplugin/javascriptreact_matchup.vim
Normal file
25
after/ftplugin/javascriptreact_matchup.vim
Normal file
@@ -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\)\@<!'
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user