catn.vim


Ⅰ. 插件描述

vim cat -n command plugin.

Ⅱ. 基本信息

创建日期:  2008-08-02
使用用户:  5
Github星:  1
插件作者:  omi taku

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'taku-o/catn-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'taku-o/catn-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'taku-o/catn-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

https://github.com/taku-o/vim-catn


Insert formatted text with number at selected area.
You can select "text format", "starting number", and "insert area".

Default value of option are
text format : "%d "
starting number : 1
insert area : current line only


[command format]

:'<,'>Catn {text format} {starting number}

:'<,'>Catn [{starting number}]

({text format} ... see ":help printf()", available format is written there.)


[command example]

(Insert number at selected area. 1, 2, 3, ....)
:'<,'>Catn

(Insert number at selected area. 1000, 1001, 1002, ....)
:'<,'>Catn 1000

(Insert formatted number text at selected area. 0000500, 0000501, 0000502, ....)
:'<,'>Catn %08d 500

==============================================================================

  1. Copy the catn.vim script to
    $HOME/vimfiles/plugin or $HOME/.vim/plugin directory.

Refer to ':help add-plugin', ':help add-global-plugin' and
':help runtimepath' for more details about Vim plugins.

  1. Restart Vim.

添加新评论