[Geany] Can I autocomplete words other than symbols?

Enrico Tröger enrico.troeger at xxxxx
Thu Jun 11 19:49:50 UTC 2009


On Wed, 10 Jun 2009 17:57:56 -0400, William wrote:

Hey,

>You hit the nail on the head. This would be nice at least if it were
>configurable....maybe a checkbox for 'autocomplete all words' or
>something similar. I agree though, this would likely not be feasible
>for multiple documents.

I hacked a little and got some code working, see attachment.
It's a plugin which provides a new keybinding named "AC Test" and bound
to Ctrl-< by default.
When used, it provides an auto completion list for the word at the
cursor, if anything is found.
It should work pretty much the same as in Scite, especially since the
code is basically a 1:1 copy of Scite's StartAutoCompleteWord()
function.

This is more or less just a test, don't expect it to be ready or stable
or anything :).

I tested it with Geany's src/interface.c which has about 250K and it
works fast enough, IMO. Thanks to Scintilla.


Just play it, see how it works and give some feedback. Thanks.


Btw, you can compile the source for testing with:

gcc -shared -o actest.so actest.c `pkg-config --cflags geany` -fPIC

and then copy the resulting .so into ~/.config/geany/plugins/ and
enable the plugin in Geany's plugin manager.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: actest.c
Type: application/octet-stream
Size: 5124 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090611/7545350b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090611/7545350b/attachment.pgp>


More information about the Users mailing list