{"id":19530162,"url":"https://github.com/tpope/vim-haystack","last_synced_at":"2026-03-11T13:15:56.225Z","repository":{"id":26856957,"uuid":"30316933","full_name":"tpope/vim-haystack","owner":"tpope","description":"haystack.vim: fuzzy matching algorithm","archived":false,"fork":false,"pushed_at":"2019-11-13T00:48:33.000Z","size":5,"stargazers_count":73,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T21:05:59.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=5103","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpope.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"tpope","custom":["https://www.paypal.me/vimpope"]}},"created_at":"2015-02-04T19:31:44.000Z","updated_at":"2025-04-30T17:49:05.000Z","dependencies_parsed_at":"2022-07-24T12:31:58.943Z","dependency_job_id":null,"html_url":"https://github.com/tpope/vim-haystack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tpope/vim-haystack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-haystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-haystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-haystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-haystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpope","download_url":"https://codeload.github.com/tpope/vim-haystack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-haystack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:29:25.101Z","updated_at":"2026-03-11T13:15:56.208Z","avatar_url":"https://github.com/tpope.png","language":"Vim script","funding_links":["https://github.com/sponsors/tpope","https://www.paypal.me/vimpope"],"categories":[],"sub_categories":[],"readme":"# haystack.vim\n\nHaystack provides a fuzzy matching algorithm for use by other Vim plugins.\nIt's based on [flx][] for Emacs but adapted to my own real world experience.\nThe algorithm gives priority to runs of consecutive letters and letters after\npunctuation marks.\n\n[flx]: https://github.com/lewang/flx\n\n## Usage\n\nHaystack defines `g:completion_filter` with a reference to a function for\nfiltering a list of items based on a user provided query.  Plugins can check\nfor this variable and use it if it exists.  This level of indirection allows\nfor alternative matching algorithms without the need for plugins to be aware\nof each one.\n\nSo far, out of the box support is included with [projectionist.vim][],\nincluding dependent plugins like [rails.vim][].\n\n[projectionist.vim]: https://github.com/tpope/vim-projectionist\n[rails.vim]: https://github.com/tpope/vim-rails\n\n### Use with fuzzy finders\n\nHere's a proof of concept for [ctrlp.vim][].\n\n    function! CtrlPMatch(items, str, limit, mmode, ispath, crfile, regex) abort\n      let items = copy(a:items)\n      if a:ispath\n        call filter(items, 'v:val !=# a:crfile')\n      endif\n      return haystack#filter(items, a:str)\n    endfunction\n    let g:ctrlp_match_func = {'match': function('CtrlPMatch')}\n\nNote that the algorithm is slow enough to feel sluggish with larger data sets.\nYou might consider a hybrid approach that uses a different algorithm above a\ncertain number of items.\n\n[ctrlp.vim]: https://github.com/kien/ctrlp.vim\n\n## License\n\nCopyright © Tim Pope.  Distributed under the same terms as Vim itself.\nSee `:help license`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-haystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpope%2Fvim-haystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-haystack/lists"}