Disable Highlight Matched Parentheses in ViM : "let loaded_matchparen = 1" not working
let g:loaded_matchparen=1
worked for me!
It sets a flag that tells code under /vim/vim81/plugin/matchparen.vim
to not assert itself.
As none of the above answers worked for me (OSX Sierra), I will provide what I think should work in any (of the usual?) configuration of vim.
As the OP, in OSX vim relies on the plugin MatchParen
for highlighting the matching parentheses. Thus, :set noshowmatch
will not work. However, :NoMatchParen
works.
The question is now to configure our ~/.vimrc
so that this plugin is disabled by default when opening a file.
As it's common to import our ~/.vimrc
from old system to any new accounts, and in the new system highlighting might be toggled by show match
, the following will address the issue automatically in both instances:
In your ~/.vimrc
add the following lines:
" Disable parentheses matching depends on system. This way we should address all cases (?)
set noshowmatch
" NoMatchParen " This doesnt work as it belongs to a plugin, which is only loaded _after_ all files are.
" Trying disable MatchParen after loading all plugins
"
function! g:FckThatMatchParen ()
if exists(":NoMatchParen")
:NoMatchParen
endif
endfunction
augroup plugin_initialize
autocmd!
autocmd VimEnter * call FckThatMatchParen()
augroup END
Note: the END
in the last augroup
line is important. Without it you get a pesky notification when calling vim
before your file gets open:
$ vi my file.txt
plugin_initialize
Press ENTER or type command to continue
Check your vimrc for showmatch
or sm
.
:set noshowmatch
or :set nosm
disables the brief jumping.