Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probability tables for autocompletion #3480

Open
jamshark70 opened this issue Jan 29, 2018 · 3 comments
Open

Probability tables for autocompletion #3480

jamshark70 opened this issue Jan 29, 2018 · 3 comments

Comments

@jamshark70
Copy link
Contributor

jamshark70 commented Jan 29, 2018

Currently, autocompletion options are arranged alphabetically. Sometimes, this means that frequently-used method selectors appear late in the list, after rare ones.

For example, type Array.fi -- probably you meant Array.fill, right? But fill is second in the list. fib is first. (fib? Did I ever use that method in 15 years?)

fill ctrl-u shows hundreds of uses of that keyword in the class library, while fib presents only one. It might be a reasonable way to build a probability table, at least initially: count references in the class library.

I haven't thought carefully about this. There might be drawbacks.

Future, non-urgent enhancement. Probably okay to file this under the IDE long-term project.

EDIT: Another example -- isN initially completes to isNaN rather than isNil. I could keep adding these... 🤣

@Sciss
Copy link
Contributor

Sciss commented Jan 29, 2018

As a side note, the Firefox algorithm for address bar completion is incredibly good; it builds up this probability type of table by itself; for SC you would probably "ship" it with some pre-trained table that could then adapt (in the ideal implementation) to the user's look-ups. Interesting topic.

@mossheim mossheim added this to the future milestone Jan 29, 2018
@scztt
Copy link
Contributor

scztt commented Feb 1, 2018

One thing to think about: once you’re beyond the first couple “most common” items in a large list, the rest of the list will be in random-ish order and won’t be easy to navigate/search visually. Beyond that, it has the potential to change each use, which is pretty disruptive when you’re accessing repeatedly. A good design might be one or two “most common”, followed by a separator plus a list with predictable order, e.g.:

__________________
Most common #1
Most common #2
__________________
A:method
B:method
Y:method
Z:method
__________________

Something like this would be a HUGE workflow improvement.

@telephon
Copy link
Member

telephon commented Feb 3, 2018

And you may want to use tab to autocomplete the word until the next choice. Like typing SinO + tab, you get SinOsc and the choices SinOsc and SinOscFB.

@mossheim mossheim added this to Windows/widgets in IDE improvements Jun 15, 2018
@mossheim mossheim moved this from Windows/widgets to Other in IDE improvements Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

5 participants