Use this page to discuss script 2611 xptemplate: snippet template engine

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.

How to change key bindings to trigger snippetsEdit

Script version: 0.4.8-r852

Quoth from the XPT help (xptemplate.txt):

NOTE with some European keyboards <C-\> does NOT work.
In this case you need to specify another key to trigger snippets.

For some reason, I had to change xptemplate.conf.vim:

call XPT#setIfNotExist('g:xptemplate_key' , '<new_key>' )
call XPT#setIfNotExist('g:xptemplate_key_pum_only' , '<S-new_key>')

It was not enough to change the keys within my vimrc file or at runtime like this:

let g:xptemplate_key = '<new_key>'
let g:xptemplate_key_pum_only = '<S-new_key>'

Cheers, Oliver May 23, 2010


Is this xptemplate plugin support java? How can I get below code after I use the key <C-\>? My file name is ''.

public class 'TestXptemplate{

Remark: the TestXptemplate should be appeared automatically.

System.out.println(); or System.out.print();

Can you get the i++ correctly after typing the 'for<C-\>'?
what I got is for(i=0;i<len;++i), it's not my purpose.

--February 4, 2012

Community content is available under CC-BY-SA unless otherwise noted.