No edit summary |
JohnBeckett (talk | contribs) (format) |
||
Line 9: | Line 9: | ||
For some reason, I had to change xptemplate.conf.vim: |
For some reason, I had to change xptemplate.conf.vim: |
||
− | : |
+ | :<tt>call XPT#setIfNotExist('g:xptemplate_key' , '<''new_key''>' )</tt> |
− | : |
+ | :<tt>call XPT#setIfNotExist('g:xptemplate_key_pum_only' , '<S-''new_key''>')</tt> |
It was not enough to change the keys within my vimrc file or at runtime like this: |
It was not enough to change the keys within my vimrc file or at runtime like this: |
||
− | : |
+ | :<tt>let g:xptemplate_key = '<''new_key''>'</tt> |
− | : |
+ | :<tt>let g:xptemplate_key_pum_only = '<S-''new_key''>'</tt> |
⚫ | |||
− | |||
⚫ | |||
==Comments== |
==Comments== |
||
− | Is this xptemplate plugin support java? How can I get below code after I use the key <C-\>? |
+ | Is this xptemplate plugin support java? How can I get below code after I use the key <C-\>? My file name is 'TestXptemplate.java'. |
+ | <pre> |
||
− | my file name is 'TestXptemplate.java' |
||
− | |||
− | e.g. |
||
− | |||
1. |
1. |
||
public class 'TestXptemplate{ |
public class 'TestXptemplate{ |
||
Line 36: | Line 32: | ||
3. |
3. |
||
Can you get the i++ correctly after typing the 'for<C-\>'? |
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 |
+ | what I got is for(i=0;i<len;++i), it's not my purpose. |
+ | </pre> |
||
+ | --February 4, 2012 |
||
+ | ---- |
Revision as of 06:41, 5 February 2012
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 May 23, 2010
Comments
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