Ⅰ. 插件描述
Generate unused file name for testing purposeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/testname'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/testname'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/testname'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/testname
Ⅳ. 文档说明
Get an unused file name for testing purpose.
File names are counted A1,A2,..,A9,B10,..,B99,C100,.. Several "sets" can be
defined. A set specifies path and extension of the file name to be
generated. Files named "lastnr.dat" maintain the counter(s) for each set.
Select a set with a KEY. An expr-abbr is a useful way to trigger the
functions.
Usage: edit a new test file:
:new tn#
Customization: variables in the vimrc
g:testname#set (dictionary)
:let g:testname#set = {}
:let g:testname#set[KEY] = { "ext": EXT, "path": PATH [, "lnk": LNPK] }
:...
KEY - (string) the selector; for use in the abbreviation, e.g. "vim"
EXT - (string) extension for the file name to be generated, e.g. ".vim"
PATH - (string) path in which to create the new files and "lastnr.dat"
(user creates the files, script only creates lastnr.dat)
LNPK - (string) optional selector to choose the path for lastnr.dat from
another set; "LastNr.dat Path Key". Makes it possible to have a
single lastnr.dat file for all paths.
* You can overwrite the one default KEY "vim".
* Different KEYs can share PATH (the lastnr file contains a line for
each KEY), only PATH + EXT must be unique (in general).
g:testname#lastnrfile (string)
name of lastnr-file in PATH; must be given without (esp. absolute) path;
default is "lastnr.dat"
g:testname#firstnr (string)
first "number" to be used, default "A1"