Hi,
even if Geany's autocomplete doesn't works for me yet, I've made my own one using another toolkit for fun.
If Geany's developpers are interested, I can give some pieces of code or ideas to implement it (I used Python + PyQt4, but that should be very portable). In this case mail-me at "kib2 at free.fr".
A little video here (ogg format, I don't know if it works on Windows) : h**p://kib2.free.fr/temp/snippets.ogg
Cheers,
Kib.
On 17/10/07 21:47:08, kib2 wrote:
Hi,
even if Geany's autocomplete doesn't works for me yet, I've made my own one using another toolkit for fun.
If Geany's developpers are interested, I can give some pieces of code or ideas to implement it (I used Python + PyQt4, but that should be very portable). In this case mail-me at "kib2 at free.fr".
I just watched the video - it might be interesting to see the code, although it probably wouldn't help much for Geany (e.g. C vs. Python, Scintilla vs. whatever Qt uses).
I think this would be a nice feature for Geany [but I won't work on it at the moment].
Regards, Nick
Nick Treleaven a écrit :
I just watched the video - it might be interesting to see the code, although it probably wouldn't help much for Geany (e.g. C vs. Python, Scintilla vs. whatever Qt uses).
I think this would be a nice feature for Geany [but I won't work on it at the moment].
Hi Nick,
The fact that it's coded in Python vs C for Geany does not really matter I think. The algorithm I found is really simple. I did some others before , calculting much things. It can be improved by providing a real parser, not one based on regexps because you'd have difficulties parsing nested placeholders.
Now, there's little calculus involved. Scintilla or Qt or whatever would do the rest, it's even simpler with Scintilla I think because I had to code by hand Qt4 methods like Scintilla's WordLeftExtend().
If you want to test it, I've uploaded yesterday a beta version of one of my app using it here : http://kib2.free.fr/reSTinPeace
regards,
Kib.
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On 22/10/07 19:04:17, kib2 wrote:
Nick Treleaven a écrit :
I just watched the video - it might be interesting to see the code, although it probably wouldn't help much for Geany (e.g. C vs.
Python,
Scintilla vs. whatever Qt uses).
The fact that it's coded in Python vs C for Geany does not really matter I think. The algorithm I found is really simple. I did some others before , calculting much things. It can be improved by providing a real parser, not one based on regexps because you'd have difficulties parsing nested placeholders.
Thanks for uploading the code. I hadn't thought of parsing the body of the replaced code, it's interesting to see. Perhaps if we added snippets to Geany it might be easier to describe the locations of each field as part of the snippet definition, rather than parse them.
I think the Scribes editor also supports snippets, it might be interesting to see how it's done there.
Regards, Nick