Ⅰ. 插件描述
Mu template (fill-out forms, expression substitution)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/mu-template'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/mu-template'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/mu-template'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/mu-template
Ⅳ. 文档说明
This is a micro-template file.
Templates should be in $VIMTEMPLATES directory.
The default is $VIM/vimfiles/template.
Template files should be named template.&ft (&ft is the filetype)
If filetype is not known, template.unknown will be read.
You shouldn't modify the script (unless you have <C-J> mapped..). All customizing is inside the templates.
You can insert 'fields' to the template. With the chars '<<' and '>>'.
Editing will be started at the first field in selectmode.
You can jump to the next field by pressing <C-J>
(sorry <C-J> is remapped in normal, insert (and visual) mode)
Expression evaluation:
Use the ¡ (press <m-!>) symbol to surround your expression.
Eg.: Creation date: ¡strftime('%c')¡
The template set is very limited, but you will get the idea, I hope.
(At least I hope you can learn some programming tricks)
FEEDBACK PLEASE!