A (slightly enhanced) implementation of TextMate's cmd-T lookup functionality, in Ruby, for embedding in other projects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Manifest initial commit Oct 9, 2008
README.rdoc gems.github.com is no more Jul 28, 2014
Rakefile initial commit Oct 9, 2008
fuzzy_file_finder.gemspec version bump Oct 13, 2008



FuzzyFileFinder is a (somewhat improved) implementation of TextMate's “cmd-T” functionality. It allows you to search for a file by specifying a pattern of characters that appear in that file's name. Unlike TextMate, FuzzyFileFinder also lets you match against the file's directory, so you can more easily scope your search.


  • Quickly search directory trees for files

  • Avoids accidentally scanning huge directories by implementing a ceiling (default 10,000 entries)

  • Simple highlighting of matches to discover how a pattern matched


In a nutshell:

require 'fuzzy_file_finder'

finder = FuzzyFileFinder.new

finder.search "app/blogcon" do |match|
  puts "[%5d] %s" % [match[:score] * 10000, match[:highlighted_path]]

matches = finder.find("app/blogcon").sort_by { |m| [-m[:score], m[:path] }
matches.each do |match|
  puts "[%5d] %s" % [match[:score] * 10000, match[:highlighted_path]]

See FuzzyFileFinder for more documentation, and links to further information.


All code, documentation, and related materials in this project are released into the PUBLIC DOMAIN. Usage, modification, and distribution are allowed without restriction.