{"id":18041846,"url":"https://github.com/bfrg/vim-fzy","last_synced_at":"2025-04-09T19:24:10.524Z","repository":{"id":48588180,"uuid":"210473954","full_name":"bfrg/vim-fzy","owner":"bfrg","description":"Run fzy asynchronously in a Vim (popup) terminal-window","archived":false,"fork":false,"pushed_at":"2023-12-24T22:50:37.000Z","size":66,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T21:22:48.623Z","etag":null,"topics":["fuzzy-search","fzy","vim","vim-plugin","vim9script"],"latest_commit_sha":null,"homepage":"","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/bfrg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-24T00:03:02.000Z","updated_at":"2025-03-11T09:52:17.000Z","dependencies_parsed_at":"2023-12-24T23:38:14.357Z","dependency_job_id":null,"html_url":"https://github.com/bfrg/vim-fzy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-fzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-fzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-fzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-fzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfrg","download_url":"https://codeload.github.com/bfrg/vim-fzy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096291,"owners_count":21047019,"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","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":["fuzzy-search","fzy","vim","vim-plugin","vim9script"],"created_at":"2024-10-30T16:13:02.715Z","updated_at":"2025-04-09T19:24:10.501Z","avatar_url":"https://github.com/bfrg.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Fuzzy Finding"],"sub_categories":[],"readme":"# vim-fzy\n\nQuickly navigate to **files** under a directory, jump to lines matching a\npattern using **grep**, open **buffers**, **tags** generated by ctags, Vim's\n**help tags**, **old files**, and **file marks** using the fuzzy-searcher\n[fzy][fzy].\n\nThe terminal buffer can be displayed either in a normal window at the bottom\nof the screen or in a popup window.\n\n\u003cdl\u003e\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/268637\"\u003e\n    \u003cimg src=\"https://asciinema.org/a/268637.png\" width=\"480\"\u003e\n  \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/dl\u003e\n\n\n## Requirements\n\n- [fzy][fzy]\n- [cut(1)][cut] (for the `:FzyHelp` command)\n- [find(1)][find] or similar (for the `:FzyFind` command)\n- [grep(1)][grep] or similar (for the `:FzyGrep` command)\n\n\n## Commands\n\n| Command           | Description                                                                             |\n| ----------------- | --------------------------------------------------------------------------------------- |\n| `:FzyFind [dir]`  | Find **files** in `[dir]`, edit selected file in the current window.                    |\n| `:FzyGrep {args}` | Grep **lines** using pattern `{args}`, jump to selected location in the current window. |\n| `:FzyBuffer`      | List **buffers**, edit selected buffer in the current window.                           |\n| `:FzyArgs`        | List **global arglist**, edit selected file in the current window.                      |\n| `:FzyLargs`       | List **local arglist**, edit selected file in the current window.                       |\n| `:FzyOldfiles`    | List **most recently used** files, edit selected file in current window.                |\n| `:FzyTjump`       | List **tags**, jump to selected tag in the current window.                              |\n| `:FzyMarks`       | List **marks**, jump to the selected mark in the current window.                        |\n| `:FzyHelp`        | List **help tags**, open help page with the selected tag in a new split.                |\n\n`[dir]` is the directory to search in. If omitted, the search is performed in\nthe current working directory. Environment variables can be passed, for example,\n`:FzyFind $VIMRUNTIME`.\n\nEach command has a related command that opens the selected item in a new split,\nlike `:FzyBufferSplit`. These commands accept a **command modifier**. For\nexample, to open a buffer in a new vertical split, run `:vert FzyBufferSplit`,\n`:tab FzyBufferSplit` will open the selected buffer in a new tab. For a full\nlist of supported command modifiers, see `:help fzy-commands-split`.\n\n\n## Configuration\n\nOptions can be passed to fzy through the dictionary `g:fzy`. The following\nentries are supported:\n\n| Entry            | Description                                                                  | Default                            |\n| ---------------- | ---------------------------------------------------------------------------- | ---------------------------------- |\n| `lines`          | Specify how many lines of results to show. This sets fzy's `--lines` option. | `10`                               |\n| `prompt`         | Set the fzy input prompt.                                                    | `'▶ '`                             |\n| `showinfo`       | If true, fzy is invoked with the `--show-info` option.                       | `v:false`                          |\n| `term_highlight` | Highlight group for the terminal window.                                     | `'Terminal'`                       |\n| `popupwin`       | Display fzy in a popup terminal.                                             | `v:false`                          |\n| `popup`          | Popup window options (dictionary).                                           | [see below](#popup-window-options) |\n| `findcmd`        | File-search command (string).                                                | [see below](#find-command)         |\n| `grepcmd`        | Grep-search command.                                                         | `\u0026grepprg`                         |\n| `grepformat`     | Format string for parsing the selected grep-output line.                     | `\u0026grepformat`                      |\n| `histadd`        | If true, add edit command to history.                                        | `v:false`                          |\n\nWhen `popupwin` is set to `v:false`, the terminal window is opened at the bottom\nof the screen and will occupy the full width of the Vim window.\n\n### Popup window options\n\nThe appearance of the popup window can be configured through the `popup` key.\nThe following options can be set:\n\n| Entry             | Description                                                                  | Default                                    |\n| ----------------- | ---------------------------------------------------------------------------- | ------------------------------------------ |\n| `highlight`       | Highlight group for popup window padding and border.                         | `'Pmenu'`                                  |\n| `padding`         | List with numbers defining padding between popup window and its border.      | `[0, 1, 0, 1]`                             |\n| `border`          | List with numbers (0 or 1) specifying whether to draw a popup window border. | `[1, 1, 1, 1]`                             |\n| `borderchars`     | List with characters used for drawing the border.                            | `['═', '║', '═', '║', '╔', '╗', '╝', '╚']` |\n| `borderhighlight` | List with highlight group names for drawing the border.¹                     | `['Pmenu']`                                |\n| `minwidth`        | Minimum width of popup window.                                               | `80`                                       |\n\n¹When only one item is specified it is used on all four sides.\n\n### Find command\n\nIf `findcmd` is not specified, the following default command is used:\n```bash\nfind\n  -name '.*'\n  -a '!' -name .\n  -a '!' -name .gitignore\n  -a '!' -name .vim\n  -a -prune\n  -o '(' -type f -o -type l ')'\n  -a -print 2\u003e /dev/null\n| cut -b3-\n```\n\nBroken down the expression means:\n- Ignore all hidden files and directories, except for `.gitignore`, and `.vim`,\n- print only files and symlinks.\n- The `cut` command will remove the leading `./` from all file paths.\n\n### Example\n\n```vim\ng:fzy = {\n    findcmd: 'fd --type f',\n    grepcmd: 'grep -Hn',\n    grepformat: '%f:%l:%m',\n    histadd: true,\n    prompt: '\u003e\u003e\u003e ',\n    showinfo: true,\n    lines: 15,\n    term_highlight: 'Pmenu',\n    popupwin: true,\n    popup: {\n        borderchars: [' ']\n    }\n}\n```\nMore examples can be found under `:help fzy-config-examples`.\n\n\n## Writing custom fzy commands\n\nWriting custom commands that invoke fzy is very simple. Internally, the above\ncommands call the `Start()` function that passes the items to fzy in a terminal\nwindow. The function is documented in `:help fzy-api`.  Examples can be found in\n`:help fzy-api-examples`.\n\n\n## Installation\n\nRun the following commands in your terminal:\n```bash\n$ cd ~/.vim/pack/git-plugins/start\n$ git clone https://github.com/bfrg/vim-fzy\n$ vim -u NONE -c 'helptags vim-fzy/doc | quit'\n```\n**Note:** The directory name `git-plugins` is arbitrary, you can pick any other\nname. For more details see `:help packages`. Alternatively, use your favorite\nplugin manager.\n\n\n## License\n\nDistributed under the same terms as Vim itself. See `:help license`.\n\n[fzy]:  https://github.com/jhawthorn/fzy\n[find]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html\n[grep]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html\n[cut]:  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-fzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfrg%2Fvim-fzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-fzy/lists"}