On Fri, 21 Nov 2008 15:51:02 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
But I think there could be a wider issue with templates - e.g. what if someone wants a {filename} string to appear in their template file and not be replaced? Using any kind of escaping for all braces e.g. {} would be annoying. So maybe a solution is to make template markers more unusual, e.g. %?filename?%.
It depends how urgent is the case someone really wants "{filename}" not to be replaced.
Maybe it won't be much of a problem, who knows.
Furthermore, all templates are editable and each {filename} occurrence (or whatever wildcard) can be removed.
(Not sure what you meant by this - I was talking about when the user has made a template that contains that string and wants to keep it, instead of having it replaced.)
I personally find using something like %?filename?% much more annoying and it would break any existing user-modified templates.
Yes, so if it doesn't affect people much just keep the current syntax.
Well, as Lex said it would be strange to use a plugin for C/C++ header file templates and normal New with Template file templates for all other files.
I didn't mean to use a plugin for special C/C++ header stuff. Either we move most things of the template code into a plugin so that using such a plugin is more reasonable.
OK, maybe.
Or we just add {BASENAME} as a template. This could work as long until someone else requests another fancy template feature.
Heh, and maybe it should be {c_header_string} or something so that chars like '-' get replaced with underscores.
Regards, Nick