Completion list suggestion

David Nolden david.nolden.kdevelop at art-master.de
Wed May 6 22:33:47 UTC 2009


Am Freitag 24 April 2009 12:53:29 schrieb Erlend Hamberg:
> Dear KDevelop deveopers,
>
> I have a suggestion for the completion feature in Kate/KDvelop.
> I just discussed this with Christoph Cullmann and he agreed that it was a
> good idea and suggested talking to you guys, as he wasn't too familiar with
> the completion list code.
>
> What I suggested was that completion would work in the following way:
>
> 1) Press ctrl+space (or another key combo) -- completion list pops up.
> 2) Pressing ctrl+space again, with the completion list still showing
> highlights the first item, pressing it again highlights the second, and so
> on, until it wraps around.
>
> [Ideally, I would like the second, thind, fourth, ... ctrl+space click to
> actually complete the word to the first, second, third, ... option so the
> user can keep typing without ever having to hit enter to make the
> completion. This would mean that people used to the "old" way could still
> hit ctrl+space, use the arrows and then hit enter, so it wouldn't break any
> usage patterns.]
>
> Any comments? Would that be hard to do?
Hi. Sorry this message slipped through my focus until now. :-)

In general I do like the idea. The only problem is that exactly this same 
mechanism is already now used to switch from simple "automatic" completion 
mode into full "user-invoked" completion mode within kdevelop.

This means that when there is a simple completion, and the user presses 
CTRL+Space, he sees more.

Now one could of course implement that when he presses _again_, the next item 
in the list is selected. That should be pretty easy to implement within 
katecompletionwidget.cpp and kateviewinternal.cpp.

It should then probably be like this: When the current completion is not yet 
an user-invoked completion, do the same thing we do now.
When it already is a user-invoked completion, move to the next item instead of 
starting it again.

Greetings, David





More information about the KDevelop-devel mailing list