sponsor Vim development Vim logo Vim Book Ad

Highlight UnMatched Brackets : Capture those unmatched brackets while u r still in insert-mode

 script karma  Rating 169/97, Downloaded by 6519  Comments, bugs, improvements  Vim wiki

created by
Naveen Chandra
script type
Its really irksome when your compiler
complains for any unmatched "{" or "(" or "[".
With this plugin you can highlight all
those unmatched "{" or "("  or  "[" as you type.
This helps you to keep track of where
the exact closing bracket should come.

This plugin also warns you of any extra "}" or ")" or "]" you typed.

   - Specifying Additional Bracket-pairs.
              User can specify additional matching pairs in
                     the global option 'matchpairs', see :help 'matchpairs'
                     For eg: set mps+=<:> (to include <> pair)
                     put the above setting in .vimrc file and restart vim.
                  - To get rid of highlighting when you quit insert
                     mode, add this mapping in your vimrc
                           noremap! <Esc> <Esc>:match NONE<CR>

To test how this plugin works type something like
  (     ) [ ]
  ( ( ( ) ) )

Happy vimming.

install details
Drop this in your plugins directory or
manually source this file using
:so UnMtchBracket.vim

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
UnMtchBracket.vim 2.0 2002-10-15 6.0 Naveen Chandra - Added support for defining additional bracket
pairs through matchpairs.
- Elliminated those irksome errorbells by silent!
- Added support for highlighting brackets within the
displayed lines i.e. highlighting the brackets is
done only in the currently displayed lines
eventhough the matching bracket is outside the
currently displayed lines.
- Elliminated those visual jerks or shifting of
editing line.
UnMtchBracket.vim 1.0 2002-07-23 6.0 Naveen Chandra Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.