sponsor Vim development Vim logo Vim Book Ad

load_template : Loading templates as html,makefile,class ... and you can make template yourself!

 script karma  Rating 59/26, Downloaded by 2089    Comments, bugs, improvements  Vim wiki

created by
zhu nianyang
script type
The plugin mainly provides the functionality that loading templates such as class,html,makefile and so on.The plugin also can load templates with script to take the replace of the filename or classname.(As default,the plugin has already included templates as main,singleton class,html,xml,makefile.)
For any question,welcome to my blog http://www.vimer.cn,
and welcome to email me:zny2008@gmail.com / dantezhu@vip.qq.com
The plugin's homepage is :
Use guide:
1)Download load_template.vim,and put it into the plugin directory.

2)Assign the directory where to load templates in your vimrc file.
For example
let g:template_path = 'C:\template\'
Warning:Don't forget about the last '\'.

3)New/Open a test.cpp,execute
It will show the template list like this:
Template filelist:
0 : cpp/main.cpp
1 : cpp/singleton.h
please select:

4)There are also options available that allow you to make your own templates(you can write vim script in it.)
Just try it yourself.

欢迎来 http://www.vimer.cn  ; 来分享你的模板文件,或者直接给我

let g:template_path = 'C:\template\'
注意,最后的'\'请务必不要忘记(在linux下也是一样要加 '/' )
Template filelist:
0 : cpp/main.cpp
1 : cpp/singleton.h
please select:
install details

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
load_template.zip 1.1.0 2010-02-09 7.0 zhu nianyang new feature:
you can control the cursor's last place. you can see the main.cpp template to know more.

现在可以控制鼠标的最后停留位置啦,你可以看一下 main.cpp这个模板来了解更多。
load_template.zip 1.0.3 2010-02-04 7.0 zhu nianyang if is windows
let the default template directory is $VIM.'\vimfiles\template'
else if linux or else
let the default template directory is $HOME.'/.vim/template/'
load_template.zip 1.0.2 2010-02-04 7.0 zhu nianyang fix the bug:
E121: 未定义的变量: g:vimrc_splitstr

E15: 无效的表达式: ‘~’.g:vimrc_splitstr.’template_source.vim’

load_template.zip 1.0.1 2010-02-03 7.0 zhu nianyang the doc file miss something...
load_template.zip 1.0 2010-02-03 7.0 zhu nianyang Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo