Textmate's 'go to file' fuzzy search is really awesome.
Wincent's Command-T plugin for vim does something similar and it rocks too.
Can someone explain how these work? Is there a general term for the method they use?
Edit: I little more detail about what those tools do
The tools let you narrow a list of options (in this case file paths) as you type.
For example if I had the following files:
/app/models/people.rb
/app/models/address.rb
/app/person.rb
/person.rb
to get to narrow the list to /app/models/people.rb
I could type any of the following:
amp
peo
mp
modelsp
it's very flexible and I find my self missing this 'list narrowing' when the app I'm using doesn't have it. I'd like to learn more about it so that I may implement my own plugins if I ever felt the need. Wish I could explain it better, but that's why I'm here :)
To see it in action take a look at wincent's demo of command-t
It appears to be doing a wildcard search between every letter.
amp -> *a*m*p*
peo -> *p*e*o*
mp -> *m*p*
modelsp -> ...
If it matches only one item in the list of options, then it would return that as the intended option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With