Ⅰ. 插件描述
Insert number-list.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/insertlist'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/insertlist'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/insertlist'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/InsertList
Ⅳ. 文档说明
Function:
This plugin inserts input-string before select position, and increments last-number.
Usage:
Execute vim script in selected area (with Visual Mode).
Plugin will be used for create following number-list.
number-list
1.
1.1.
1.1.1.
1.1.2.
1.1.3.
1.1.4.
1.2.
1.3.
1.4.
1.5.
1.6.
2.
2.1.
2.2.
2.3.
2.4.
[command format]
:'<,'>INSERTLIST numberlist
or
:'<,'>InsertList numberlist
ex1:
before text
(1) Please use "Visual mode blockwise", and select following text area.
|
|
(2) Input following command.
:'<,'>INSERTLIST 1.
after text
1.
2.
========================================
ex2:
before text
aaa
bbb
(1) Please use "Visual mode blockwise", and select following text area.
aaa|
bbb|
(2) Input following command.
:'<,'>INSERTLIST 1.
after text
aaa1.
bbb2.
========================================
ex3:
before text
(1) Please use "Visual mode blockwise", and select following text area.
|
|
(2) Input following command.
:'<,'>INSERTLIST strName[0] =
after text
strName[0] =
strName[1] =
========================================
ex4:
before text
(1) Set following option.
:set virtualedit=all
(2) Please use "Visual mode blockwise", and select following text area.
|
|
(3) Input following command.
:'<,'>INSERTLIST 1.
after text
1.
2.
========================================
ex5: Other input-string format pattern.
(1) 1.1 to 1.N
(2) 1-1 to 1-N
(3) <1> to <N>
(4) 001 to 00N