Sort commands based on the frequency of use


#1

For example, every time when a user types “install” user always chooses the option “Install package”.
It should be preselected the next time, instead of having to move all the way down.


Naturally, if the search field is empty, it should show the most frequently used commands.


#2

I saw this related issue: https://github.com/atom/command-palette/issues/28.


#3

I see that has been open for a while (since Feb). Not sure anyone is on it though?


#4

There are over 2,800 open Issues across the Atom projects and only about four people working on Atom full-time. The best way for something to get done quickly is for someone in the community to help out :grinning:


#5

I’m trying to address these (and other) issues on my Everything package: https://atom.io/packages/everything

The approach is mostly the same in SublimeText - it keeps the old search box.

My package does a little more, that is provide an API so we can search for everyhing - not only commands - but this is out of scope in this thread :smile:


#6

Hello @mauricioszabo , just tried it out. Cool!

However, I suppose the sorting feature is not implemented yet? Tested it several times and the most frequent command is not on top.


#7

Not yet, in fact the only thing that I mostly use is that, as in Sublime, it keeps the last words that you searched in the view, so it is easier to repeat the last first command on the list multiple times.

I’m still struggling on how to make this sorting, because I want to be sure that other providers can override it (and because I need to fine-tune the sorting algorithm. Enlightenment window manager have a searcher that most of the time does the right thing, so probably I’ll copy from there)


#8

IMHO, just the one last command should be at the top and the rest sorted how you wish.