Wikia

Vim Tips Wiki

Script:2611

Talk0
1,612pages on
this wiki

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 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

CommentsEdit

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

1.
public class 'TestXptemplate{
    cursor
}

Remark: the TestXptemplate should be appeared automatically.

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

3.
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


Around Wikia's network

Random Wiki