Hi all, this is my first posting to the geany mail list! I've been looking for a replacement for Editplus (excellent windows text editor... but now I completely debian/ubuntu based) to do my coding (php/perl/sql) and Geany looks like it might be sufficient.
What I need to be able to do ( I'm not sure if "snippets" can actually do it) is as follows: 1. Bring up a list that has all my little fragments of code. THis will not replace any text it simply will be inserted at the cursor point 2. I would like to search quickly my fragments e.g mysql_connect will insert the 4 or 5 lines have the mysql_connect code with my username passwords host etc in it 3. Once I find the correct fragment I click on it and it inserts the code into the editor at the cursor point. 4. I have different lists as well. e.g phpcode,perlcode,actionscript code, etc
Can Geany do this? If so I would greatly appreciate some assistance on how to set this up.
I do apologise if this is what snippets can do, because my understanding of it is different to what I've outlined above. I did search the archives but could find exactly my scenario
thanks all Sam
Sounds like what you want to do would pbe implemented by a plugin /ˈmɪstər/ /ˈdʒɛnəsɪs/@/dʒi/ /meɪl/ /dɒt/ /kɒm/ Benjamin West
On Fri, Jan 30, 2009 at 8:20 PM, Sam Russo samrusso4@gmail.com wrote:
Hi all, this is my first posting to the geany mail list! I've been looking for a replacement for Editplus (excellent windows text editor... but now I completely debian/ubuntu based) to do my coding (php/perl/sql) and Geany looks like it might be sufficient.
What I need to be able to do ( I'm not sure if "snippets" can actually do it) is as follows:
- Bring up a list that has all my little fragments of code. THis will
not replace any text it simply will be inserted at the cursor point 2. I would like to search quickly my fragments e.g mysql_connect will insert the 4 or 5 lines have the mysql_connect code with my username passwords host etc in it 3. Once I find the correct fragment I click on it and it inserts the code into the editor at the cursor point. 4. I have different lists as well. e.g phpcode,perlcode,actionscript code, etc
Can Geany do this? If so I would greatly appreciate some assistance on how to set this up.
I do apologise if this is what snippets can do, because my understanding of it is different to what I've outlined above. I did search the archives but could find exactly my scenario
thanks all Sam _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Am Samstag, den 31.01.2009, 14:20 +1100 schrieb Sam Russo:
Hi all, this is my first posting to the geany mail list! I've been looking for a replacement for Editplus (excellent windows text editor... but now I completely debian/ubuntu based) to do my coding (php/perl/sql) and Geany looks like it might be sufficient.
What I need to be able to do ( I'm not sure if "snippets" can actually do it) is as follows:
- Bring up a list that has all my little fragments of code. THis will
not replace any text it simply will be inserted at the cursor point 2. I would like to search quickly my fragments e.g mysql_connect will insert the 4 or 5 lines have the mysql_connect code with my username passwords host etc in it
Until this point, this is possible with snippets which are supported by current versions of geany. You will have to manually edit your snippets.conf accordingly. See the documentation for information how to do that.
- Once I find the correct fragment I click on it and it inserts the
code into the editor at the cursor point.
Sounds like you are asking for a GUI to edit and list snippets. Would be an interesting feature, but i don't think it will get into 0.16. Maybe in a later version or as a plugin. Patches are welcome anyway i think. (I'm not developer of geany.)
- I have different lists as well.
e.g phpcode,perlcode,actionscript code, etc
This is also supported by the snippets-feature, at least PHP and Perl are. I'm not sure if geany has language support for Action Script yet.
_______________________________________________
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Thanks all, 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.
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.
For my own use ATM I will put them all into a "Tomboy Notebook" and search->copy->paste into Geany.
Thanks sam
Dominic Hopf wrote:
Am Samstag, den 31.01.2009, 14:20 +1100 schrieb Sam Russo:
Hi all, this is my first posting to the geany mail list! I've been looking for a replacement for Editplus (excellent windows text editor... but now I completely debian/ubuntu based) to do my coding (php/perl/sql) and Geany looks like it might be sufficient.
What I need to be able to do ( I'm not sure if "snippets" can actually do it) is as follows:
- Bring up a list that has all my little fragments of code. THis will
not replace any text it simply will be inserted at the cursor point 2. I would like to search quickly my fragments e.g mysql_connect will insert the 4 or 5 lines have the mysql_connect code with my username passwords host etc in it
Until this point, this is possible with snippets which are supported by current versions of geany. You will have to manually edit your snippets.conf accordingly. See the documentation for information how to do that.
- Once I find the correct fragment I click on it and it inserts the
code into the editor at the cursor point.
Sounds like you are asking for a GUI to edit and list snippets. Would be an interesting feature, but i don't think it will get into 0.16. Maybe in a later version or as a plugin. Patches are welcome anyway i think. (I'm not developer of geany.)
- I have different lists as well.
e.g phpcode,perlcode,actionscript code, etc
This is also supported by the snippets-feature, at least PHP and Perl are. I'm not sure if geany has language support for Action Script yet.
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
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