Hi,
I would like to know if there is a way to autocomplete words other than symbols in Geany similar to the way it works in Scite. For example, when I am programming in Haskell, I normally write the type definition for a function before I write the function itself:
------------------------ SomeReallyLongFunctionName :: Int -> Int ------------------------
Then I immediately start writing the function definition after that, however I can't use autocomplete to complete the function name. Instead I have to either type the whole thing out again or copy and paste it. This would also help out a lot when I am programming in a language that is not directly supported by Geany i.e. Groovy.
Thanks In Advance, Bryan
On Wed, 10 Jun 2009 15:26:41 -0400, William wrote:
Hi,
I would like to know if there is a way to autocomplete words other than symbols in Geany similar to the way it works in Scite. For example, when I am programming in Haskell, I normally write the type definition for a function before I write the function itself:
SomeReallyLongFunctionName :: Int -> Int
Then I immediately start writing the function definition after that,
Because I (maybe others) don't know Haskell at all, a code sample would help demonstrating what you want.
however I can't use autocomplete to complete the function name. Instead I have to either type the whole thing out again or copy and paste it. This would also help out a lot when I am programming in a language that is not directly supported by Geany i.e. Groovy.
If I understand you correctly, you want completion of arbitrary words of the current document. This is indeed not possible but was requested one or even multiple times in the past. The obvious problem is that it might slow down everything significantly because then Geany would parse and remember each single word in the current document and to complete the typed start of a word it would need to check the already typed against all words of the document. If you want it globally, for all open documents, it would be even worse. However, maybe it won't be as slow or not noticeable, this needs to be tested.
Regards, Enrico
Thanks,
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 know Scite does this by default for a single document and does not show any noticeable speed deficiency as a result. If this were to be developed I'd happily test this theory with large documents.
Thanks, Bryan
2009/6/10 Enrico Tröger enrico.troeger@uvena.de:
On Wed, 10 Jun 2009 15:26:41 -0400, William wrote:
Hi,
I would like to know if there is a way to autocomplete words other than symbols in Geany similar to the way it works in Scite. For example, when I am programming in Haskell, I normally write the type definition for a function before I write the function itself:
SomeReallyLongFunctionName :: Int -> Int
Then I immediately start writing the function definition after that,
Because I (maybe others) don't know Haskell at all, a code sample would help demonstrating what you want.
however I can't use autocomplete to complete the function name. Instead I have to either type the whole thing out again or copy and paste it. This would also help out a lot when I am programming in a language that is not directly supported by Geany i.e. Groovy.
If I understand you correctly, you want completion of arbitrary words of the current document. This is indeed not possible but was requested one or even multiple times in the past. The obvious problem is that it might slow down everything significantly because then Geany would parse and remember each single word in the current document and to complete the typed start of a word it would need to check the already typed against all words of the document. If you want it globally, for all open documents, it would be even worse. However, maybe it won't be as slow or not noticeable, this needs to be tested.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
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
Hey,
Thanks for writing the plugin, however I was unable to get Geany to pick it up.
I compiled the plugin to actest.so using the command you supplied, however I was unable to get Geany to pick it up. The plugins directory for in ~/.config/geany didn't exist yet so I created it and placed the .so file inside, however Geany didn't show it in the plugin manager.
I also placed the file within /usr/lib/geany/ where the other plugins were located (the ones shipped with Geany) however I did not have any luck there either. Geany is loading the other plugins, just not this one. Does geany give any error message if it fails to load a plugin.
For reference, the command I used to compile was:
gcc -shared -o actest.so actest.c `pkg-config --cflags geany` -fPIC
Thanks, Bryan
2009/6/11 Enrico Tröger enrico.troeger@uvena.de:
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
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 12 Jun 2009 11:53:52 -0400, William wrote:
Hey,
Thanks for writing the plugin, however I was unable to get Geany to pick it up.
I compiled the plugin to actest.so using the command you supplied, however I was unable to get Geany to pick it up. The plugins directory for in ~/.config/geany didn't exist yet so I created it and placed the .so file inside, however Geany didn't show it in the plugin manager.
I also placed the file within /usr/lib/geany/ where the other plugins were located (the ones shipped with Geany) however I did not have any luck there either. Geany is loading the other plugins, just not this one. Does geany give any error message if it fails to load a plugin.
For reference, the command I used to compile was:
gcc -shared -o actest.so actest.c `pkg-config --cflags geany` -fPIC
Help->Debug Messages should have some information. Also, what distribution are you using and what version of Geany?
Regards, Enrico
Help->Debug Messages should have some information.
Odd, I didn't see any messages other than geany loading the files I had open previously.
Also, what distribution are you using and what version of Geany?
I'm using Ubuntu 9.04, and the current version in the Package Manger: Geany 0.16
2009/6/12 Enrico Tröger enrico.troeger@uvena.de:
On Fri, 12 Jun 2009 11:53:52 -0400, William wrote:
Hey,
Thanks for writing the plugin, however I was unable to get Geany to pick it up.
I compiled the plugin to actest.so using the command you supplied, however I was unable to get Geany to pick it up. The plugins directory for in ~/.config/geany didn't exist yet so I created it and placed the .so file inside, however Geany didn't show it in the plugin manager.
I also placed the file within /usr/lib/geany/ where the other plugins were located (the ones shipped with Geany) however I did not have any luck there either. Geany is loading the other plugins, just not this one. Does geany give any error message if it fails to load a plugin.
For reference, the command I used to compile was:
gcc -shared -o actest.so actest.c `pkg-config --cflags geany` -fPIC
Help->Debug Messages should have some information. Also, what distribution are you using and what version of Geany?
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 12 Jun 2009 15:22:58 -0400, William wrote:
Help->Debug Messages should have some information.
Odd, I didn't see any messages other than geany loading the files I had open previously.
Hmm, weird. Check Nick's answer, maybe that helps already.
Also, what distribution are you using and what version of Geany?
I'm using Ubuntu 9.04, and the current version in the Package Manger: Geany 0.16
Either update Geany to 0.17 (http://www.geany.org/Download/ThirdPartyPackages#ubuntu knows where newer packages can be found) or edit the actest.c and change line 46 from: PLUGIN_VERSION_CHECK(140); to PLUGIN_VERSION_CHECK(132);
(i.e. lower the number), maybe the plugin compiles then with Geany 0.16, however this is untested.
Did you see any warning when compiling the source file? Any compiler output?
Regards, Enrico
On Fri, 12 Jun 2009 11:53:52 -0400 William Gilbert gilbertw1@gmail.com wrote:
for in ~/.config/geany didn't exist yet so I created it and placed the .so file inside, however Geany didn't show it in the plugin manager.
That should be: ~/.config/geany/plugins
But if ~/.config/geany didn't exist, either you haven't run Geany or you have an old version of Geany.
I also placed the file within /usr/lib/geany/ where the other plugins were located (the ones shipped with Geany) however I did not have any luck there either. Geany is loading the other plugins, just not this
What is the path that geany uses? Try: geany --print-prefix
one. Does geany give any error message if it fails to load a plugin.
Yes, if run with -v it prints information in a terminal, but these messages should be seen in the help->debug window anyway. E.g. :
** INFO: Plugin "/home/nmt/.config/geany/plugins/vcdiff.so" is not binary compatible with this release of Geany - recompile it.
For reference, the command I used to compile was:
gcc -shared -o actest.so actest.c `pkg-config --cflags geany` -fPIC
What does 'file actest.so' report? It's possible gcc is creating a relocatable object file or executable instead of a shared library.
You might need to do something like:
gcc -shared -c actest.c `pkg-config --cflags geany` -fPIC gcc -shared actest.o -o actest.so `pkg-config --libs geany` -fPIC
Regards, Nick
On Thu, 11 Jun 2009 21:49:50 +0200, Enrico wrote:
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.
Since it turned out to be as simple as having this one and a half function to get this working, I'm thinking about this to put into Geany directly and just connect it to a new keybinding (Ctrl-Shift-Return or something),
First, I assumed we need to do some caching or at least pre-generate the list but I think the generation of the word list is fast enough so that we can generate it on demand and so a plugin is probably a bit heavy, this is why I think we could get it into the core and users will be able to easier find and use this feature.
Thoughts?
Regards, Enrico
Hey, I think that would be a great idea. I changed the check version in the plugin and was able to get Geany to recognize it afterwards to great success. I can't speak for the existing user base, but I would find this invaluable and at worst since this will be generated on demand (which I think is a good idea) it couldn't affect existing users if they decide not to use it.
Thanks, Bryan
2009/6/16 Enrico Tröger enrico.troeger@uvena.de
On Thu, 11 Jun 2009 21:49:50 +0200, Enrico wrote:
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.
Since it turned out to be as simple as having this one and a half function to get this working, I'm thinking about this to put into Geany directly and just connect it to a new keybinding (Ctrl-Shift-Return or something),
First, I assumed we need to do some caching or at least pre-generate the list but I think the generation of the word list is fast enough so that we can generate it on demand and so a plugin is probably a bit heavy, this is why I think we could get it into the core and users will be able to easier find and use this feature.
Thoughts?
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Tue, 16 Jun 2009 15:59:22 -0400, William wrote:
Hey, I think that would be a great idea. I changed the check version in the plugin and was able to get Geany to recognize it afterwards to great success. I can't speak for the existing user base, but I would find
there is at least one other user who also would like that. I remember to have read the same request at least once in the past :).
this invaluable and at worst since this will be generated on demand (which I think is a good idea) it couldn't affect existing users if they decide not to use it.
Yes, exactly. I just didn't expect it works that well in the first place but after I wrote the code (read: copied from Scite) it was quite obvious we can do it this way.
Regards, Enrico
On Tue, 16 Jun 2009 21:49:14 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Since it turned out to be as simple as having this one and a half function to get this working, I'm thinking about this to put into Geany directly and just connect it to a new keybinding (Ctrl-Shift-Return or something),
First, I assumed we need to do some caching or at least pre-generate the list but I think the generation of the word list is fast enough so that we can generate it on demand and so a plugin is probably a bit heavy, this is why I think we could get it into the core and users will be able to easier find and use this feature.
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Regards, Nick
On Tue, 16 Jun 2009 21:12:44 +0100, Nick wrote:
On Tue, 16 Jun 2009 21:49:14 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Since it turned out to be as simple as having this one and a half function to get this working, I'm thinking about this to put into Geany directly and just connect it to a new keybinding (Ctrl-Shift-Return or something),
First, I assumed we need to do some caching or at least pre-generate the list but I think the generation of the word list is fast enough so that we can generate it on demand and so a plugin is probably a bit heavy, this is why I think we could get it into the core and users will be able to easier find and use this feature.
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
Regards, Enrico
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Regards, Nick
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Regards, Enrico
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Please add also a hidden pref inside config file for these users which like this feature and are to lazy to activate it again and again.
Cheers, Frank
On Wed, 17 Jun 2009 19:57:50 +0200, Frank wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Please add also a hidden pref inside config file for these users which like this feature and are to lazy to activate it again and again.
???
What do you want to activate? As I said, I won't add any pref for merging it with normal auto-completion.
Maybe I shouldn't commit the changes and wait until someone (Nick, or whoever) wants to integrate with normal autocompletion. As said, I don't mind but won't do this myself.
Regards, Enrico
On Wed, 17 Jun 2009 20:00:53 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 19:57:50 +0200, Frank wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
> Thoughts?
Well, IMO it would be nice to be able to have this set to work automatically, without having to press a special keybinding. So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Please add also a hidden pref inside config file for these users which like this feature and are to lazy to activate it again and again.
???
What do you want to activate? As I said, I won't add any pref for merging it with normal auto-completion.
Maybe I shouldn't commit the changes and wait until someone (Nick, or whoever) wants to integrate with normal autocompletion. As said, I don't mind but won't do this myself.
Maybe I misunderstood you - another time.
When rereading and thinking again, I now think your goal was to just commit the function which is working only (= generating list etc) when pressing defined keystroke. Previously I understood the automerging stuff .... Well, if I'm now right, I agree and adding any option would be not very useful at all here beside the keybinding ;)
Cheers, Frank
On Wed, 17 Jun 2009 20:07:55 +0200, Frank wrote:
On Wed, 17 Jun 2009 20:00:53 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 19:57:50 +0200, Frank wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
>> Thoughts? > >Well, IMO it would be nice to be able to have this set to work >automatically, without having to press a special keybinding. >So if added, I would suggest a pref. Sounds cool though ;-)
Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Please add also a hidden pref inside config file for these users which like this feature and are to lazy to activate it again and again.
???
What do you want to activate? As I said, I won't add any pref for merging it with normal auto-completion.
Maybe I shouldn't commit the changes and wait until someone (Nick, or whoever) wants to integrate with normal autocompletion. As said, I don't mind but won't do this myself.
Maybe I misunderstood you - another time.
When rereading and thinking again, I now think your goal was to just commit the function which is working only (= generating list etc) when pressing defined keystroke. Previously I understood the automerging stuff .... Well, if I'm now right, I agree and adding any option would be not very useful at all here beside the keybinding ;)
Yo, I was only talking about adding the word completion by using a new keybinding.
But if you wish to have this merged with the normal autocompletion list, it's maybe better when we do this directly instead of first adding a keybinding which we will remove then again later. Not to mention about breaking plugin API/ABI and confusion of users and all.
So, if you want this in the normal auto completion paired with a pref, please go implement and commit it or send a patch.
I don't see the point in committing code which changes API and is known to be thrown away in some days/weeks.
Regards, Enrico
On Wed, 17 Jun 2009 20:52:26 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 20:07:55 +0200, Frank wrote:
On Wed, 17 Jun 2009 20:00:53 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 19:57:50 +0200, Frank wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 17 Jun 2009 14:24:38 +0100, Nick wrote:
On Tue, 16 Jun 2009 22:28:08 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
> >> Thoughts? > > > >Well, IMO it would be nice to be able to have this set to > >work automatically, without having to press a special > >keybinding. So if added, I would suggest a pref. Sounds > >cool though ;-) > > Huh? Together with the normal autocompletion of symbols?
For now, a keybinding would be fine. I was thinking of combined autocompletion of words in the current file and tags from other files, but this would be more work.
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
I will commit the code as I said: bound to a keybinding only, for now. I don't mind if this gets improved later.
Please add also a hidden pref inside config file for these users which like this feature and are to lazy to activate it again and again.
???
What do you want to activate? As I said, I won't add any pref for merging it with normal auto-completion.
Maybe I shouldn't commit the changes and wait until someone (Nick, or whoever) wants to integrate with normal autocompletion. As said, I don't mind but won't do this myself.
Maybe I misunderstood you - another time.
When rereading and thinking again, I now think your goal was to just commit the function which is working only (= generating list etc) when pressing defined keystroke. Previously I understood the automerging stuff .... Well, if I'm now right, I agree and adding any option would be not very useful at all here beside the keybinding ;)
Yo, I was only talking about adding the word completion by using a new keybinding.
OK. So we are now on the same page ;)
But if you wish to have this merged with the normal autocompletion list, it's maybe better when we do this directly instead of first adding a keybinding which we will remove then again later. Not to mention about breaking plugin API/ABI and confusion of users and all.
So, if you want this in the normal auto completion paired with a pref, please go implement and commit it or send a patch.
No. To be honest, I don't have much usage for this feature. But thought about making it ore comfortable when adding. Never mind it - was caused by a misunderstanding.
Cheers, Frank
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
Yes, I wonder how SciTE does it. Maybe every e.g. 5 seconds, if idle, and the document has been modified, it could regenerate the list.
Regards, Nick
On Thu, 18 Jun 2009 12:31:53 +0100, Nick wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
Yes, I wonder how SciTE does it. Maybe every e.g. 5 seconds, if idle, and the document has been modified, it could regenerate the list.
Yo, maybe, Though I'd say generating the list on document save would be enough, similar to the tags update. But as I said, I don't mind much about this as I won't use this feature at all (probably :D).
Maybe it's even possible to always generate the list live, on demand. But this just needs testing, once someone has implemented it.
Regards, Enrico
Personally, I liked your original solution the best. I WILL be using this once it is completed, and would prefer to have this done in real time as scite does it. It would make sense to have a semantic completion, like there is currently in geany and a general completion, which would be a list of all words in the document. It's just my opinon, but it would be nice to tap into either list when needed.
Either way its implemented my hope is that the list of all words will be generated on demand, without any delays.
Thanks, Bryan
2009/6/19 Enrico Tröger enrico.troeger@uvena.de:
On Thu, 18 Jun 2009 12:31:53 +0100, Nick wrote:
On Wed, 17 Jun 2009 19:53:19 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Ok, so you want to merge the lists for auto-completion. I think when we do this, we do need to pre-generate and cache the list of words of the current file as generating the list would probably too heavy for every keystroke, even if only enabled by a pref.
Yes, I wonder how SciTE does it. Maybe every e.g. 5 seconds, if idle, and the document has been modified, it could regenerate the list.
Yo, maybe, Though I'd say generating the list on document save would be enough, similar to the tags update. But as I said, I don't mind much about this as I won't use this feature at all (probably :D).
Maybe it's even possible to always generate the list live, on demand. But this just needs testing, once someone has implemented it.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 19 Jun 2009 11:42:47 -0400, William wrote:
Personally, I liked your original solution the best. I WILL be using this once it is completed, and would prefer to have this done in real time as scite does it. It would make sense to have a semantic completion, like there is currently in geany and a general completion, which would be a list of all words in the document. It's just my opinon, but it would be nice to tap into either list when needed.
Either way its implemented my hope is that the list of all words will be generated on demand, without any delays.
What about doing both ways:
- generate and show the list when a keybinding is used (i.e. on-demand, as the test plugin did it) - pre-generate the list on document save to be used together with normal autocompletion and bind this feature to a new global pref
?
Regards, Enrico
Sounds like a great idea to me! Thanks a lot for taking an active interest in this request, I really appreciate it.
2009/6/19 Enrico Tröger enrico.troeger@uvena.de:
On Fri, 19 Jun 2009 11:42:47 -0400, William wrote:
Personally, I liked your original solution the best. I WILL be using this once it is completed, and would prefer to have this done in real time as scite does it. It would make sense to have a semantic completion, like there is currently in geany and a general completion, which would be a list of all words in the document. It's just my opinon, but it would be nice to tap into either list when needed.
Either way its implemented my hope is that the list of all words will be generated on demand, without any delays.
What about doing both ways:
- generate and show the list when a keybinding is used (i.e. on-demand,
as the test plugin did it)
- pre-generate the list on document save to be used together with
normal autocompletion and bind this feature to a new global pref
?
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Fri, 19 Jun 2009 11:42:47 -0400 William Gilbert gilbertw1@gmail.com wrote:
It would make sense to have a semantic completion, like there is currently in geany and a general completion, which would be a list of all words in the document. It's just my opinon, but it would be nice to tap into either list when needed.
Either way its implemented my hope is that the list of all words will be generated on demand, without any delays.
Now done in SVN. It turns out the document word completion is fast enough to use for autocomplete-as-you-type, see the new 'Autocomplete all words in document' completion pref.
The 'Complete word' keybinding now works as follows: "Shows the autocompletion list. If already showing tag completion, it shows document word completion instead, even if it is not enabled for automatic completion. Likewise if no tag suggestions are available, it shows document word completion."
Regards, Nick
Awesome! Thanks for doing this
On Thu, Jul 9, 2009 at 10:30 AM, Nick Treleavennick.treleaven@btinternet.com wrote:
On Fri, 19 Jun 2009 11:42:47 -0400 William Gilbert gilbertw1@gmail.com wrote:
It would make sense to have a semantic completion, like there is currently in geany and a general completion, which would be a list of all words in the document. It's just my opinon, but it would be nice to tap into either list when needed.
Either way its implemented my hope is that the list of all words will be generated on demand, without any delays.
Now done in SVN. It turns out the document word completion is fast enough to use for autocomplete-as-you-type, see the new 'Autocomplete all words in document' completion pref.
The 'Complete word' keybinding now works as follows: "Shows the autocompletion list. If already showing tag completion, it shows document word completion instead, even if it is not enabled for automatic completion. Likewise if no tag suggestions are available, it shows document word completion."
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Thu, 9 Jul 2009 10:37:22 -0400, William wrote:
Awesome! Thanks for doing this
+1
:).
Regards, Enrico
William Gilbert schrieb:
Hi,
I would like to know if there is a way to autocomplete words other than symbols in Geany similar to the way it works in Scite. For example, when I am programming in Haskell, I normally write the type definition for a function before I write the function itself:
SomeReallyLongFunctionName :: Int -> Int
Make sure you safe your document after typing it for the first time, only that will refresh the symbol list.
If that's not working, the Haskell code seems definitely lacking a key feature IMO. If that's a normal function declaration (it's been ages since I saw Haskell the last time, the it really should be considered as symbol.