FelikZ/ctrlp-py-matcher — pull request #9 by jdowner (2014-09-19 21:49:15+00:00)
Title: More complete search for possible matches

Currently the search performed is a greedy search that returns the first match. I have modified the regex so that the search is not greedy and is applied successively on a path or filename to find the smallest possible solution to the regex. I have also changed the scoring function so that it is the reciprocal of the length of a match. This rewards the shortest match independent of the length of the path.

I have also made a lot of optimizations to iteration and regex construction.

I'm putting this PR up for feedback. I realize these are a lot of changes and they may not be quite where you want to go with the tool. But I hope when you try it out you'll like the results :)