[Geany] filename template wildcards - Re: Different templates for .c and .h?

Nick Treleaven nick.treleaven at xxxxx
Fri May 7 12:56:02 UTC 2010


On Fri, 7 May 2010 22:18:57 +1000
Lex Trotman <elextr at gmail.com> wrote:

> Perhaps the {filename} could be left in the file until it is saved the first
> time and all occurrences replaced.  But then, are there any languages where
> that is a valid sequence? Looks vaguely like Perl or Ruby but its been a
> while since I've used them??  Maybe templates are going to have to force
> immediate saving so they can get a filename.

After the 0.19 release I think we could maybe do this:
Replace {filename} with e.g. {GEANY_TEMPLATE_filename} and set a
document flag. When first saving the new file, if the flag is set,
replace {GEANY_TEMPLATE_filename} with the real filename.

I think that string is unlikely to occur in a file, and much less in an
unsaved document.

> As for the scrambled screen, I'm not sure what that is, but it probably
> isn't related to the template, does it happen with any other existing files?
> 
> I suggest that you post the tgz to the mailing list (taking out anything
> that you don't want on a public forum of course) so that Nick/Enrico can
> look at it.

Maybe post in a new thread.

Regards,
Nick



More information about the Users mailing list