On Mon, 24 Nov 2008 16:16:06 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
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.)
Hmm, so using two wildcard formats? One to be replaced on file creation and to be replaced when saving the file?
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.
Yeah and two months one comes and want somthing similar for Java or whatever and wants to get it replaced using CamelCase and yet another one wants it to be all lowercase or whatever. Anyway, to solve this for now, we could add {BASENAME} or {c_header_string} or something like this.
Regards, Enrico