Vim Tips Wiki
(standard format)
(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
Line 1: Line 1:
{{ScriptComments|2611|xptemplate: snippet template engine}}
+
{{ScriptComments|xptemplate: snippet template engine}}
   
 
==How to change key bindings to trigger snippets==
 
==How to change key bindings to trigger snippets==

Revision as of 07:42, 15 November 2011

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 vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

How to change key bindings to trigger snippets

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

Comments