You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
:let loaded_matchparen = 1
-The plugin installs CursorMoved autocommands to redefine the match
-highlighting.
+The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
+redefine the match highlighting.
To disable the plugin after it was loaded use this command: >
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2007 Jul 30
+" Last Change: 2007 Aug 8
" Exit quickly when:
" - this plugin was already loaded (or disabled)
augroup matchparen
" Replace all matchparen autocommands
- autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair()
+ autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
augroup END
" Skip the rest if it was already done.
endfunction
" Define commands that will disable and enable the plugin.
-command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen
-command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved
+command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
+ \ au! matchparen
+command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
let &cpo = cpo_save