sequence


Ⅰ. 插件描述

Increment / Decrement a sequence of numbers

Ⅱ. 基本信息

创建日期:  2010-09-26
使用用户:  5
Github星:  2
插件作者:  Dimitar Dimitrov

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/kurkale6ka/vim-sequence

Ⅳ. 文档说明

Increment / Decrement a sequence of numbers

Usage:

Put the cursor anywhere on these lines. The range will be guessed and the first
sequence of numbers will be transformed. If you want to transform the second
sequence of numbers you must use a visual block selection (dashes in this
example).

array [1] = 9              array [1] = -9-              array [1] = 9
array [1] = 9              array [2] = -9-              array [2] = 8
array [1] = 9    alt-a:    array [3] = -9-    alt-x:    array [3] = 7
array [1] = 9              array [4] = -9-              array [4] = 6
array [1] = 9              array [5] = -9-              array [5] = 5

With a count:

array [1] = 9              array [1] = -9-              array [1] = 9
array [1] = 9              array [3] = -9-              array [3] = 7
array [1] = 9   2 alt-a:   array [5] = -9-   2 alt-x:   array [5] = 5
array [1] = 9              array [7] = -9-              array [7] = 3
array [1] = 9              array [9] = -9-              array [9] = 1

Note: If the range is not easy to guess, use a selection instead

If you wanted to increment / decrement all numbers by only one, select your
lines and press ^a / ^x

   v mode                     ^v mode
array [1] = 8              array [6] = -8-              array [6] = 5
array [1] = 8              array [6] = -8-              array [6] = 5
array [1] = 8     5 ^a:    array [6] = -8-     3 ^x:    array [6] = 5
array [1] = 8              array [6] = -8-              array [6] = 5
array [1] = 8              array [6] = -8-              array [6] = 5

This plugin integrates with Tim Pope's repeat plugin. It means that you can use
. (dot)
to repeat any normal mode (for now) sequence mapping you just used!

For more information see: http://github.com/tpope/vim-repeat

添加新评论