Ⅰ. 插件描述
Locate tags with out of order attributesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/find-xml-tags'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/find-xml-tags'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/find-xml-tags'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Find-XML-Tags
Ⅳ. 文档说明
I was editing an HTML file written by several developers over the course of a
few years. They contained tags like (yes, literally!)
<table cellpadding=0 cellspacing="0" border='0'>
<table cellspacing="0" cellpadding=0 border='0'>
<table cellspacing=0 cellpadding=0 border=0>
They're all basically the same table definition, but the attributes are
switched around and the attribute values are formatted differently each time.
(Thank the multiple developers, each with their own style.) Running HTML Tidy
wasn't an option because I didn't want to create a huge diff in version
control that indicated a lot of changes where I didn't actually change
- Thus, this plugin.
The commands and functions defined in this script will match any XML/HTML
element/tag with the specified attributes and values.