fuzzy_file_finder

A (slightly enhanced) implementation of TextMate's cmd-T lookup functionality, in Ruby, for embedding in other projects

  • 所有者: jamis/fuzzy_file_finder
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

= FuzzyFileFinder

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.

== FEATURES:

  • 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

== SYNOPSIS:

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]]
end

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]]
end

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

== LICENSE:

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

主要指标

概览
名称与所有者jamis/fuzzy_file_finder
主编程语言Ruby
编程语言Ruby (语言数: 1)
平台
许可证Other
所有者活动
创建于2008-10-09 20:49:48
推送于2014-07-28 03:55:03
最后一次提交2014-07-27 21:55:03
发布数0
用户参与
星数143
关注者数4
派生数14
提交数19
已启用问题?
问题数2
打开的问题数0
拉请求数0
打开的拉请求数0
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?