jeancroy / fuzz-aldrin-plus

Sublime text like fuzzy filtering - compatible with atom/fuzzaldrin
MIT License
269 stars 21 forks source link

More importance on word beginnings #4

Closed donaldpipowitch closed 9 years ago

donaldpipowitch commented 9 years ago

Say I have the files

And I look for us_e2 I get tests/b*u*yers/order*s*_*e2*e.js and several other files, but not tests/buyers/users_e2e.js.

jeancroy commented 9 years ago

Added following test, which pass without any change. Do you have any additional information ?

it "prefers matches that are together in the basename", ->

      candidates = [
        path.join('tests','buyers','orders_e2e.js'),
        path.join('tests','buyers','users_e2e.js')
      ]

      expect(bestMatch(candidates, 'us_e2')).toBe candidates[1]

Is this enabled ? img

donaldpipowitch commented 9 years ago

Oh man, I'm sorry. My example was wrong. I actually have something like this

But I still would expect tests/buyers/users-addresses_e2e.js to show up before tests/buyers/orders_e2e.js which is not the case.

jeancroy commented 9 years ago

Ok then the problem is the penalty for the length of filename. In the meantime a query like uae2 should work better (IE use the fact you want the address)

jeancroy commented 9 years ago

Ok we pass your new use case too without any change. But I believe this is because of the changes to fix #1 . (Not yet pushed to atom)