Ⅰ. 插件描述
PairTools plugin for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'martinlafreniere/pairtools'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'martinlafreniere/pairtools'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'martinlafreniere/pairtools'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/martinlafreniere/vim-pairtools
Ⅳ. 文档说明
VIM PairTools 1.5.2
Changes
PairTools has progressed to version 1.5.2 with many additions and modifications.
The plugin architecture underwent a major rework and the following changes
occured:
- What was implemented as PairTools 1.0 is now called the PairClamp module
and is located in the autoload directory. PairClamp doesn't implement the
surround feature anymore, but you can use the surround plugin instead. - The file pairtools.vim is still located inside the plugin directory, but
is now used as a central module for every other modules to set options and
mappings. A new module call TagWrench handles the angle brackets pair < and >, the
<% %>, <? ?> pairs, as well as XML and HTML tags, using builtin or user
hook functions to decided when ending tags should be inserted, and much- For more details see the help file.
- A new module call Jigsaw now handle backspace <BS> and carriage return
<CR> hook functions to call based on the current context. For example, the
PairClamp context will delete defined pairs, and the TagWrench context
will delete angle bracket pairs, but also single tags and a pair of
starting and ending tags. Details are provided in the help file. Options (features) name changed a bit; they are now construct like this:
g:pairtools_{filetype}_{option_name}So it will require some renaming from users of version 1.0. Also, as of
version 1.5, all options are disabled by default.- New 'Apostrophe' options added to avoid the quote to auto-close after a
letter. - A vimball is now provided and can be downloaded at:
http://www.vim.org/scripts/script.php?script_id=3560
Description
This Vim plugin manages operation involving pairs. It implements very popular
features such as auto close when the opening symbol is typed, auto step out
using the closing symbol, avoids auto close inside some syntax area, do not
close based on the right character(s) using regex-like expressions, and much
more.
Installation
There are a two ways to install the plugin, the preferred one being 1:
- Using git clone manually copy all files
- Download the vimball at: http://www.vim.org/scripts/script.php?script_id=3560