On Friday 11 July 2008 16.07.14 Nick Treleaven wrote:
On Fri, 11 Jul 2008 13:37:59 +0200 Micael <m8847@abc...> wrote:
As far as I can understand, there's no keyword autocompletion. With this I mean e.g. that I type "wh" and hit space, where the editor exanps the keyword and builds the construct, such as: while ( ) { } .. or similar.
I understand that the functionality is almost there, by instead use TAB, but only once the full keyword has been entered. i.e. while<TAB> builds the construct.
You can set the 'Complete snippet' keybinding to space if you like.
Actually, no, as Geany (yet) does not have context knowledge - i.e. if I would write the (quite common) word "if" whithin a comment, it would expand to the construct build... But, I can live with the TAB expansion, in one way, one could argue that it is more natural in the linux environment anyway.
I also realise that snippets could be enhanced to do this, if there would be an optional accept length? e.g: "accept keyword min len lookup = 2" would give the correct key-word expansion after at least wh and TAB where entered. (Obviously whi<TAB> would also work)
Maybe this could be implemented. For now you could edit ~/.geany/snippets.conf and change the 'while' key to 'wh'.
Yeah, I guess! Maybe that is a solution. As this will generate quite a few snippets, I would be concerned about the speed. But maybe this is not really a problem.
Thanks, Micael