Ⅰ. 插件描述
vim-templⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'cartroo/vim-templ'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'cartroo/vim-templ'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'cartroo/vim-templ'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/cartroo/vim-templ
Ⅳ. 文档说明
vim-templ
This is an extremely simple templating plugin for Vim since none of the
existing ones seemed to meet my needs.
Currently it's likely that this plugin isn't of much use to anybody else, but
for the record you can create templates in the ~/.vim/templates directory
(not currently configurable) which are simple plain text files. These can then
be inserted into the current document with :LoadTemplate <name> where<name> is the filename of the template. This command will tab-complete names
of templates.
There are currently two tokens which will be replaced during the substitution:
- '{UUID}' will be replaced by a random UUID (requires
uuidgenutility). - '{DT:x}' will be replaced by the current date/time where
xis a
strftime()format.
In the event that anybody does find this plugin useful and wants to request
some changes, by all means drop me a line at andy@andy-pearce.com.