-
Notifications
You must be signed in to change notification settings - Fork 41
Home
Code snippets engine for Vim. And snippets library. Life is short, do less, get more. You can use XPtemplate as a Snippet Engine or as a Language Grammar Guide.
vim xpt.c
for<C-\>
generates:
for (i = 0; i < len; ++i){
/* cursor */
}
Press <tab>
,<tab>
.. to navigate through "i", "0", "len" and finally stop at "/* cursor */
"
Home: http://www.vim.org/scripts/script.php?script_id=2611
Discuss, Bug report, Feature request : http://groups.google.com/group/xptemplate
-
GIT built:
git clone git://github.com/drmingdrmer/xptemplate-dist.git
-
GIT source and built:
git clone --recursive git://github.com/drmingdrmer/xptemplate.git
-
SVN built:
svn checkout http://xptemplate.googlecode.com/svn/trunk/dist
-
SVN source and built: TODO svn serves only as a distribution repo
svn checkout http://xptemplate.googlecode.com/svn/trunk
C language: http://www.vimeo.com/7614329
Python: http://www.vimeo.com/7868048
Tutorial by Derek Wyatt : http://vimeo.com/4449258
Live update as typing
No worrying about breaking snippet rendering incautiously.
Navigate forward and backward. <Tab>
and <S-Tab>
Embed language support like JAVASCRIPT in HTML. Or HTML in PHP.
Repetition item, such as the "case" in "switch"
Wrapper snippet
Inclusion support on snippet level or file level
Functions and variables can be used to generate dynamical content
Format customization: for example the line break before "{"
Place holders can be very simple, even without a index number or name!
Place holders can have order or not
Alternative item default value other than place holder's name.
Filter for cleaning up issues.