Ⅰ. 插件描述
Vim's MatchParen for HTML tagsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gregsexton/matchtag'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gregsexton/matchtag'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gregsexton/matchtag'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gregsexton/matchtag
Ⅳ. 文档说明
# Readme
This plugin highlights the matching HTML tag when the cursor is
positioned on a tag. It works in much the same way as the MatchParen
plugin.
It was inspired by this question http://stackoverflow.com/q/8168320/20388.
The latest 'release' is available on vim.org.
Other file types
To get this to work for file types other than html that use a similar
tag structure (e.g XML) you can do something similar to this.
echo 'runtime! ftplugin/html.vim' > ~/.vim/ftplugin/xml.vim
The xml.vim file demonstrated here is included with MatchTag.
Screenshot
Thanks to ithaca.arpinum.org for this screenshot.