aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Sections and key navigation in the completion window.[Enhancement Request] #501

Closed zhaopuming closed 10 years ago

zhaopuming commented 10 years ago

Now completion items in the popup window is ordered by characters, but more often than not it is populated with a lot of methods that one don't use that frequently, for example, methods that are in Object class or in algorithms, hiding the ones people want to use (they are splattered all around).

So I suggest to make sections in the completion window, for example:

Sections
Directly declared methods
UFCS methods with exact type match
Inherited methods
Templated UFCS (algorithms and others)

and items in each section is sorted by characters.

This makes the completion more informative and usually people would identify the method they want more quickly.

Of cause we need to navigate between sections quickly, I suggest three short cuts: (these short cuts are activated only when a completion window is open)

ShortCut Behavior
Ctrl+N select next completion item
Ctrl+P select previous completion item
Tab go to next section
Ctrl + ] ditto
Ctrl + [ go to preview section

Then completion would become much faster when there are lots of items.

aBothe commented 10 years ago

Hi Zhao, thanks for the nice ideas, but please try out pressing Ctrl+Space twice while editing. There already are completion categories implemented, although not in the sense you imagined them :)

zhaopuming commented 10 years ago

Thanks~~ so the categories are split by modules. That's OK for me :-) Do you know how can I switch the default behavior to completion categories? I'm in favor of categories and would like to only hit Ctrl+space once for it, and also I'd like that to appear when I hit a dot operator. Another question is how can I navigate (other than up and down arrow, which are too far) through completion items?

aBothe commented 10 years ago

https://bugzilla.xamarin.com/show_bug.cgi?id=16484 -- Although it's planned to have a property that would enable categories by default it might take another year or so before they actually touch the enhancement.

zhaopuming commented 10 years ago

OK, then we have to wait....sigh

aBothe commented 10 years ago

I'll try to get MD cloned and try to fix it in.

zhaopuming commented 10 years ago

You are wonderful! I have to thank you again for the great work on Mono-D, recently there are great updates on dub support and now I'm working happily with Mono-d/dub :-)

etcimon commented 10 years ago

recently there are great updates on dub support and now I'm working happily with Mono-d/dub

That was on my mind recently. The IDE went from being unstable every 10 minutes to being stable 8 hrs/day and trustworthy for bug detection in the code, in the span of not even 5 months.

aBothe commented 10 years ago

Alright, it got merged - https://github.com/mono/monodevelop/pull/614 Now we just have to wait until the next MD/XS updates arrive.

zhaopuming commented 10 years ago

wow, that is great ! thanks alexander!