sponsor Vim development Vim logo Vim Book Ad

xptemplate : XP's Snippet Template engine for vim

 script karma  Rating 656/187, Downloaded by 10306  Comments, bugs, improvements  Vim wiki

created by
drdr xp
script type
Code snippets engine for Vim, with snippets library.
XPTemplate let you write codes in a smooth, quick and comfortable way.

=======================   Usage   =======================

vim xpt.c
// Type  "for<C-\>" :
for (i = 0; i < len; ++i) {
   /* cursor */
Press <tab>,<tab>.. to navigate through "i", "0", "len". Cursor will finally stops at "/* cursor */".

=======================   Features   =======================

* Live update while typing
* Navigate forward and backward. <Tab> and <S-Tab>
* Embed language support like JAVASCRIPT in HTML. Or HTML in PHP
* Wrapper
* Smart indent
* Spacing and line-break of snippet can be easily changed to fit your coding style
* Pop up menu friendly

=======================   Resources   =======================

Screencast : 0.3.9 :  http://code.google.com/p/xptemplate/wiki/ScreenCasts;

Get From GIT: git://github.com/drmingdrmer/xptemplate.git;
Project Home : https://github.com/drmingdrmer/xptemplate;
Follow me: http://twitter.com/xptemplate;

*** Troubleshoot / supertab support / bracket complete / other question ***

=======================   Compatibilities   =======================

Supported platform:  Linux, WinXP, // [g]vim 7.2
Supported Language:  ada c cabal cpp cs css dot erlang gitconfig gnuplot haskell html java javascript lex lua make ocaml perl php ps1 python r ruby(eruby) scheme sh tcl tex vim xml xpt xslt yacc

**Bundles: c_autoimplem cpp_autoimplem javascript_jquery

Special Thanks to ^0^ :
Christian.Coutinho  Vincent Berthoux  Fabio  Simon Ruderich
install details
copy files(xpt/*) into runtime path(.vim/).
:helptags path_to_xpt/doc
:help xpt

And you need at least turn on these 2 settings in ".vimrc" :
set nocompatible
filetype plugin  on


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
xpt- 2012-01-12 7.2 drdr xp fix over strict filetype regexp. Thanks to Krzysztof
xpt- 2011-12-19 7.2 drdr xp fix python::def snippet bug thanks to daethorian
xpt- 2011-07-07 7.2 drdr xp Fix cindent problem with indentkeys
xpt- 2011-07-05 7.2 drdr xp Fixed a lot bugs. Thanks to adshuangjoh@gmail.com and Kirill Klenov
xpt-0.4.8-r1031.tgz 0.4.8-1031 2010-11-29 7.2 drdr xp fix bug that with "fo+=ta" xpreplace messes up text. Reported by koelner.r
xpt-0.4.8-r994.tgz 0.4.8-r994 2010-09-01 7.2 drdr xp Fix: bug of converting space to tab
xpt-0.4.8-r976.tgz 0.4.8-r976 2010-08-30 7.2 drdr xp Fix: mistakingly using SPop as SParg in bracket completion.
xpt-0.4.8-r962.tgz 0.4.8-r962 2010-08-27 7.2 drdr xp Fix: bracket following multi-bytes char breaks the previous char
xpt-0.4.8-r957.tgz 0.4.8-r957 2010-08-26 7.2 drdr xp Fix bug that xpreplace sometimes removes chars if folding enabled.

Fix nav-key issue with selection set to be exclusive.
xpt-0.4.8-r911.tgz 0.4.8-r911 2010-07-25 7.0 drdr xp fix problem that pressing <Tab> with pum unclosed gets chars lost
xpt-0.4.8-r899.tgz 0.4.8-r899 2010-07-10 7.0 drdr xp Fix: brace completion bug with pop up menu opened. Thanks to yeskky reporting this issue.

Add: 3 new filetypes : gitconfig, gnuplot, r. Simple and useful. Thanks to Vicent B
xpt-0.4.8-r860.tgz 0.4.8-r860 2010-05-24 7.0 drdr xp Fix some mistakes in doc.
Fix but with repetition started at the first char.
Fix <expr> mapping bug
xpt-0.4.8-r852.tgz 0.4.8-r852 2010-05-23 7.0 drdr xp Add: autoimplemen bundle for c and cpp.
Fix: cross-line place holder is created incorrectly.

Plenty Thanks to  Vincent B and Simon Ruderich.
xpt-0.4.8-r842.tgz 0.4.8-r842 2010-05-17 7.0 drdr xp Fix: auto-indent bug
xpt-0.4.7.tgz 0.4.7-r807 2010-04-28 7.0 drdr xp fix: improve non-word char snippet name support
fix: when <tab> pressed to go to next, pum does not close and it swallows some chars
fix: removes all XPTemplateDef command
fix: supertab does not work well
fix: pum bug mess text.
fix: edges with quotes are wrongly evaluated.
xpt- 2009-12-14 7.0 drdr xp Fix : vim halts when XPT searching for keywords
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.
Vim at Github