Friday, June 24, 2011

Aw: Re: Aw: Re: Conditionally generated templates

Hi,

Am Freitag, 24. Juni 2011 18:49:21 UTC+2 schrieb Luc Hermitte:
With mu-template, I had to add a hook in order to load project-specific settings (defined with plugins like local_vimrc)


Something similar would be necessary with tskeletons too in order to determine the project's source directory. I skipped it in the above example.

Out of curiosity, does tskeleton support template-file inclusions ?


You can include snippets if that's what you meant.

<+bit:other_snippet+>
 

as they imply some complexity if we want to support things like a switch-snippet that loads the case-snippet for every value from an enumeration.


I haven't tried something like this before but you should be able to do:

<+for(s:var in s:parts)+>
<+bit:other_snippet+>
<+endfor(s:var)+>

where other_snippet is:

Part: <+s:var+>

> but that requires a lot of context pushes&pops

Every snippet is expanded in a scratch buffer of its own.

Regards,
Tom

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: