On Mon, 10 Nov 2008 21:55:11 +0200, jay jay.27182818@gmail.com wrote:
Hey,
thanks for reply. it would be great to move all template related stuff into a plugin. most ide's like eclipse or netbeans or even vs first ask user to select a template and then to specify a name for the new file. if i'm not mistaken eclipse cdt can create unnamed files the same way geany does but in such cases it doesn't use any templates. so geany is just missing asking for a filename. It'd be nice if you make it
Yes, Geany asks first for the filename when the file is actually to be saved, not when creating. I like it this way as it makes creating files more easy and fast.
possible for plugins to intercept menu actions like file creation or saving - it will make it easy to store all template related code in a plugin that would handle creating new files.
To some extend, this is already possible. There are plugin signals emitted when a document is created, opened, saved and closed. Hwoever, except for closed, these signals are emitted after the corresponding action. But this might be still enough for a template plugin to add the desired functionality. Feel free to work on this, if any API changes/additions needed, just tell us about and we'll see how we can solve it.
Regards, Enrico