markohlebar / Peckham

Add #import-s from anywhere in the code.
MIT License
714 stars 94 forks source link

Fuzzy matching instead of matching a prefix #12

Closed samsonjs closed 8 years ago

samsonjs commented 10 years ago

It would be great to be able to import, say, SDWebImageManager.h by typing "sdwim" rather than "SDWebImageM".

markohlebar commented 10 years ago

Sounds like a great idea, thanks ;) actually as it is now, you don't have to do SDWebImage... You can just do ImageManager, and it would probably be the quickest way to get it.

samsonjs commented 10 years ago

Right after posting I realized that I didn't actually check whether it had to be a prefix. Thanks for the suggestion, it probably does the job 90% of the time :+1: :)

markohlebar commented 10 years ago

No probs, will implement the fuzzy matching anyways since it would be a great feature. Cheers!

oit63 commented 8 years ago

Maybe fuzzy matching is a great feature, such as me with a lot of long name classes, with this feature I can just input few words to match the proper class, highly effective.

markohlebar commented 8 years ago

@ForrestAlfred I started work on that a long time ago and never got around to finalize it. Will go back to take a look at the state of it and maybe finish it off quick.

clementpadovani commented 8 years ago

Current [WIP], should be quick.

https://github.com/ClementPadovani/Peckham/tree/feature/fuzzySearch

clementpadovani commented 8 years ago

Actually @markohlebar if you could have a look that’d be cool

markohlebar commented 8 years ago

@ClementPadovani this is cool! I think we can just ship it as a first version of fuzzy matching support. It would be awesome to add the highlighting as well. Also maybe a result that matches capitalization i.e. when I type SAO in search for MHSearchArrayOperation would be weighted as more relevant?

clementpadovani commented 8 years ago

@markohlebar Yes, that’d be cool. However isn’t a little soon to ship?

There’s currently a test that’s failing due to the fuzzy-searching and the search results don’t render correctly.

markohlebar commented 8 years ago

@ClementPadovani shipped it already, if you use it as you usually would, there is no noticable difference. I'm currently working on rendering and highlights, hopefully will be done today 👍 also, I fixed that test.

markohlebar commented 8 years ago

@samsonjs @ClementPadovani I'm pretty happy with the results, check it out.

oit63 commented 8 years ago

Perfect

clementpadovani commented 8 years ago

untitled 2

Really impressed! Thanks!