{"id":15433501,"url":"https://github.com/octaltree/linearf","last_synced_at":"2025-08-26T07:15:12.993Z","repository":{"id":83697492,"uuid":"371691896","full_name":"octaltree/linearf","owner":"octaltree","description":"A fast and extensible fuzzy finder on vim","archived":false,"fork":false,"pushed_at":"2025-01-09T09:29:16.000Z","size":422,"stargazers_count":41,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:55:30.973Z","etag":null,"topics":["vim"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octaltree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-28T12:22:17.000Z","updated_at":"2025-01-14T12:47:52.000Z","dependencies_parsed_at":"2023-12-25T10:46:21.944Z","dependency_job_id":"d7cecd5d-0255-4ce2-839a-64b9c808adda","html_url":"https://github.com/octaltree/linearf","commit_stats":{"total_commits":208,"total_committers":1,"mean_commits":208.0,"dds":0.0,"last_synced_commit":"4c60cd85a61e78e62ea13c7a78a84af99e8fbde0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/octaltree/linearf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octaltree%2Flinearf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octaltree%2Flinearf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octaltree%2Flinearf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octaltree%2Flinearf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octaltree","download_url":"https://codeload.github.com/octaltree/linearf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octaltree%2Flinearf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272188198,"owners_count":24888760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["vim"],"created_at":"2024-10-01T18:34:16.452Z","updated_at":"2025-08-26T07:15:12.942Z","avatar_url":"https://github.com/octaltree.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linearf\nA fast and extensible fuzzy finder for vimmers\n\n![](https://user-images.githubusercontent.com/7942952/144457920-fea501bd-196a-4192-99d6-7c1658d9dd0b.png)\n\n## Concept\n* Show the first view faster\n* Find as fast as if they were in linear time\n* High modularity and extensibility\n\n## Requirements\n* [cargo](https://doc.rust-lang.org/book/ch01-01-installation.html) nightly\n* vim and +lua/dyn, or neovim and luajit\n\n## Usage\nFirst, install the plugins and sources locally. If you use dein as your package\nmanager, it will look like this.\n```vim\ncall dein#add('octaltree/linearf', {'merged': 0})\ncall dein#add('octaltree/linearf-my-flavors') # optional\n```\n\nPaste config\n```lua\n--lua\u003c\u003cEOF\n-- If you paste in vimrc, surround with EOF\n\nlocal linearf = require('linearf')\nlocal flavors = require('linearf-my-flavors')\n\n-- Initialize with a view module\nlinearf.init(require('linearf-vanilla').new())\n\n-- Specify the sources to include in the build\nlinearf.recipe.sources = {\n    {name = \"identity\", path = \"flavors_plain::Identity\"},\n    {name = \"command\", path = \"flavors_tokio::Command\"}\n}\nlinearf.recipe.converters = {\n    {name = \"format_line\", path = \"flavors_plain::FormatLine\"}\n}\nlinearf.recipe.matchers = {\n    {name = \"identity\", path = \"flavors_plain::Identity\"},\n    {name = \"substring\", path = \"flavors_plain::Substring\"},\n    {name = \"clap\", path = \"flavors_clap::Clap\"}\n}\n-- Auto-build if you want\nlinearf.bridge.try_build_if_not_exist = true\nlinearf.bridge.try_build_on_error = true\n\n-- Define your scenario. flavors provides you with several presets\nlocal function set(target, context_manager, scenario)\n    linearf.context_managers[target] = context_manager\n    linearf.scenarios[target] = scenario\nend\nset('line', flavors.context_managers['line'], flavors.merge {\n    flavors.scenarios['line'],\n    flavors.scenarios.quit,\n    flavors.scenarios.no_list_insert,\n    flavors.scenarios.no_querier_normal,\n    {\n        linearf = {\n            list_nnoremap = {\n                [\"\u003cCR\u003e\"] = flavors.hide_and(flavors.actions.line.jump)\n            },\n            querier_inoremap = {\n                [\"\u003cCR\u003e\"] = flavors.normal_and(\n                    flavors.hide_and(flavors.actions.line.jump))\n            }\n        },\n        view = {querier_on_start = 'insert'}\n    }\n})\nlocal use_rg = false\nset('file', flavors.context_managers[use_rg and 'file_rg' or 'file_find'],\n    flavors.merge {\n    flavors.scenarios[use_rg and 'file_rg' or 'file_find'],\n    flavors.scenarios.quit,\n    flavors.scenarios.no_list_insert,\n    flavors.scenarios.no_querier_normal,\n    {\n        linearf = {\n            list_nnoremap = {\n                [\"\u003cCR\u003e\"] = flavors.hide_and(flavors.actions.file.open),\n                [\"\u003cnowait\u003es\"] = flavors.hide_and(flavors.actions.file.split),\n                [\"t\"] = flavors.hide_and(flavors.actions.file.tabopen),\n                [\"v\"] = flavors.hide_and(flavors.actions.file.vsplit)\n            },\n            querier_inoremap = {\n                [\"\u003cCR\u003e\"] = flavors.normal_and(\n                    flavors.hide_and(flavors.actions.file.open))\n            }\n        }\n    }\n})\nset('grep', flavors.context_managers[use_rg and 'grep_rg' or 'grep_grep'],\n    flavors.merge {\n    flavors.scenarios[use_rg and 'grep_rg' or 'grep_grep'],\n    flavors.scenarios.quit,\n    flavors.scenarios.no_list_insert,\n    flavors.scenarios.enter_list,\n    {\n        linearf = {\n            list_nnoremap = {\n                [\"\u003cCR\u003e\"] = flavors.hide_and(flavors.actions.grep.open),\n                [\"\u003cnowait\u003es\"] = flavors.hide_and(flavors.actions.grep.split),\n                [\"t\"] = flavors.hide_and(flavors.actions.grep.tabopen),\n                [\"v\"] = flavors.hide_and(flavors.actions.grep.vsplit)\n            },\n            querier_inoremap = {},\n            querier_nnoremap = {\n                [\"\u003cnowait\u003e\u003cESC\u003e\"] = flavors.actions.view.goto_list\n            }\n        }\n    }\n})\n\n-- optional\nlinearf.utils.command(\n    \"nnoremap \u003csilent\u003e\u003cspace\u003e/ :\u003cc-u\u003elua linearf.run('line')\u003cCR\u003e\")\nlinearf.utils.command(\n    \"nnoremap \u003csilent\u003e\u003cspace\u003ef :\u003cc-u\u003elua linearf.run('file')\u003cCR\u003e\")\nlinearf.utils.command(\n    \"nnoremap \u003csilent\u003e\u003cspace\u003eg :\u003cc-u\u003elua linearf.run('grep')\u003cCR\u003e\")\nlinearf.utils.command(\n    \"nnoremap \u003csilent\u003e\u003cspace\u003el :\u003cc-u\u003elua linearf.resume_last()\u003cCR\u003e\")\n\n\n-- for vimrc\n--EOF\n```\n\nThen run with the pre-defined scenario and its difference.\n```vim\nlua lnf('line')\nlua lnf('line', {})\n```\nFor more information, see `:help linearf`\n\n## TODO\n- [x] implement logic\n- [x] runtime reloading and auto building\n- [x] implement view\n- [x] implement action\n- [x] implement linearf-my-flavors\n- [ ] use vim as a fuzzy finder from CLI\n- [ ] implement preview\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctaltree%2Flinearf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctaltree%2Flinearf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctaltree%2Flinearf/lists"}