Highlight UnMatched Brackets


Ⅰ. 插件描述

Capture those unmatched brackets while u r still in insert-mode

Ⅱ. 基本信息

创建日期:  2002-07-23
使用用户:  16
Github星:  6
插件作者:  Naveen Chandra

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/highlight-unmatched-brackets'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/highlight-unmatched-brackets'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/highlight-unmatched-brackets'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Highlight-UnMatched-Brackets

Ⅳ. 文档说明

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.

Customization:  

       - 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.

-ncr

添加新评论