On Sun, 01 Feb 2009 13:05:34 +1100, Sam Russo samrusso4@gmail.com wrote:
Hi Sam,
I've had some replies re my request on snippets, and I've implemented some additions in my /home/sam/.geany/snippets.conf
it works OK but still not really enough.
Let me explain: In editiplus I you have a cliptext library tab (part of the GUI) when you open up the correct cliptext library (e.g phpcode) you see all the labels for your fragments of code. You put so much in there you ofter have to search it. e.g I might be inserting a text box into a webpage and I know one of my fragments had some style sheet code in there. So I would look up "text" and all my cliptext library entries starting with "text" can be toggled through. I then find the "text box - style sheet" entry double click it and it inserts the code into the editor at the cursor position. With Geany's snippets you actually have to remember the keyboard entry to have it inserted. This won't work because there are literally hundreds of entries and you memory is jogged by looking them up and then inserting them.
I see your point but it's just not (yet) implemented. Maybe someone wants to write code for such an interface, ideally as a plugin.
Here is another scenario that I use cliptext libraries that Geany snippets could benefit from: I teach programming for students and after delivering a lesson I can ask them to pull up, for example the "Module 23 Cliptext". Inside this there would be the code I used in each of the Tutorials from Module 23. Eg "Tutorial 1 - Exercise 1code", "Tutorial 2 - Exercise 2 code" etc.
To some extend, this reminds me to templates. In Geany you can edit the default templates as well as adding new, custom templates. Not exactly the same but maybe you will still like it :).
Regards, Enrico