mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Improve loading time when matchparen_enabled=0
Also be more robust in loading pi_paren's plugin/matchparen.vim cf. #25, cf. SpaceVim/SpaceVim/#1482
This commit is contained in:
@@ -30,14 +30,18 @@ if exists('g:loaded_matchit')
|
||||
endif
|
||||
let g:loaded_matchit = 1
|
||||
|
||||
if get(g:, 'matchup_matchparen_enabled', 1)
|
||||
if !exists('g:loaded_matchparen')
|
||||
runtime plugin/matchparen.vim
|
||||
endif
|
||||
" ensure pi_paren is loaded but deactivated
|
||||
try
|
||||
runtime plugin/matchparen.vim
|
||||
au! matchparen
|
||||
command! NoMatchParen call matchup#matchparen#toggle(0)
|
||||
command! DoMatchParen call matchup#matchparen#toggle(1)
|
||||
endif
|
||||
catch /^Vim\%((\a\+)\)\=:E216/
|
||||
unlet! g:loaded_matchparen
|
||||
runtime plugin/matchparen.vim
|
||||
silent! au! matchparen
|
||||
let g:loaded_matchparen = 1
|
||||
endtry
|
||||
command! NoMatchParen call matchup#matchparen#toggle(0)
|
||||
command! DoMatchParen call matchup#matchparen#toggle(1)
|
||||
|
||||
if get(g:, 'matchup_override_vimtex', 0)
|
||||
let g:vimtex_matchparen_enabled = 0
|
||||
|
||||
Reference in New Issue
Block a user