Files
vim-matchup/plugin/matchup.vim
Andy K. Massimino fb09f4ae8e 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
2018-04-02 14:54:11 -04:00

54 lines
1.1 KiB
VimL

" vim match-up - matchit replacement and more
"
" Maintainer: Andy Massimino
" Email: a@normed.space
"
if !get(g:, 'matchup_enabled', 1) || &cp
finish
endif
if !get(g:, 'matchup_no_version_check', 0)
\ && !(v:version >= 704 || has('nvim-0.1.7'))
echoerr 'match-up does not support this version of vim'
finish
endif
if !has('reltime')
echoerr 'match-up requires reltime()'
finish
endif
if exists('g:loaded_matchup')
finish
endif
let g:loaded_matchup = 1
if exists('g:loaded_matchit')
echoerr 'match-up must be loaded before matchit'
finish
endif
let g:loaded_matchit = 1
" ensure pi_paren is loaded but deactivated
try
runtime plugin/matchparen.vim
au! matchparen
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
endif
call matchup#init()
" vim: fdm=marker sw=2