{"id":13594699,"url":"https://github.com/Yggdroot/LeaderF","last_synced_at":"2025-04-09T07:33:45.830Z","repository":{"id":12845674,"uuid":"15521349","full_name":"Yggdroot/LeaderF","owner":"Yggdroot","description":"An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.","archived":false,"fork":false,"pushed_at":"2024-10-10T07:54:44.000Z","size":2627,"stargazers_count":2142,"open_issues_count":54,"forks_count":178,"subscribers_count":50,"default_branch":"master","last_synced_at":"2024-10-29T15:34:40.538Z","etag":null,"topics":["ctags","fuzzy","fuzzy-matching","fuzzy-search","fuzzyfinder","gtags","mru","ripgrep","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Yggdroot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://github.com/Yggdroot/SponsorMe/blob/main/README.md#donate"]}},"created_at":"2013-12-30T05:43:36.000Z","updated_at":"2024-10-28T06:51:28.000Z","dependencies_parsed_at":"2023-09-25T05:27:22.608Z","dependency_job_id":"e5d511d9-5c6c-4185-b2cc-0ac7a2ea5a4f","html_url":"https://github.com/Yggdroot/LeaderF","commit_stats":{"total_commits":955,"total_committers":52,"mean_commits":"18.365384615384617","dds":"0.11308900523560206","last_synced_commit":"ab810656f787a387189d8a1ce4002ce38007f7b2"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yggdroot%2FLeaderF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yggdroot%2FLeaderF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yggdroot%2FLeaderF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yggdroot%2FLeaderF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yggdroot","download_url":"https://codeload.github.com/Yggdroot/LeaderF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223066711,"owners_count":17082143,"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":["ctags","fuzzy","fuzzy-matching","fuzzy-search","fuzzyfinder","gtags","mru","ripgrep","vim"],"created_at":"2024-08-01T16:01:37.831Z","updated_at":"2024-11-06T16:31:45.028Z","avatar_url":"https://github.com/Yggdroot.png","language":"Python","funding_links":["https://github.com/Yggdroot/SponsorMe/blob/main/README.md#donate"],"categories":["Python","Python (1887)"],"sub_categories":[],"readme":"LeaderF\n=======\n\nAn efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly.\n\n - Written in Python.\n - Support fuzzy and regex searching.\n - Full-featured.\n - Well-designed fuzzy matching algorithm.\n - [Extensible](https://github.com/Yggdroot/LeaderF/wiki/Extensions).\n\nChangelog\n---------\n\nPlease see the [CHANGELOG](https://github.com/Yggdroot/LeaderF/blob/master/CHANGELOG.md) for a release history.\n\nWiki\n----\n\n[Wiki](https://github.com/Yggdroot/LeaderF/wiki).\n\nExtensions\n----------\n\nA list of community extensions can be found in the [Extensions](https://github.com/Yggdroot/LeaderF/wiki/Extensions) wiki.\n\nScreenshots\n-----------\n\n![Popup Mode][1]\n\n![And Mode][2]\n\nRequirements\n------------\n\n - vim7.3 or higher. Only support 7.4.1126+ after [v1.01](https://github.com/Yggdroot/LeaderF/releases/tag/v1.01).\n - Python2.7+ or Python3.1+.\n - To use the popup mode, neovim 0.5.0+ or vim 8.1.1615+ are required.\n\nInstallation\n------------\n\nFor [vim-plug][5] user:\n\n```vim\nPlug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }\n```\n\nPerformance\n-----------\n\nLeaderF is already very fast. If you'd like better performance, install the C extension of the fuzzy matching algorithm, which is more than 10 times faster.  \nTo install the C extension, firstly, make sure `python2` and/or `python3` commands are available on Linux/Unix/MacOS and `py -2` and/or `py -3` commands are available on Windows.\n\n - Install the C extension\n    ```vim\n    :LeaderfInstallCExtension\n    ```\n    There may be some errors during the installation, please google the error messages to resolve it.  \n    For example, `\"error: Unable to find vcvarsall.bat\"`, you can turn to [here][6] for help.\n\n\n- Uninstall the C extension\n    ```vim\n    :LeaderfUninstallCExtension\n    ```\n\nAfter running any command of LeaderF, check the value of `echo g:Lf_fuzzyEngine_C`, if the value is 1, it means the C extension is loaded sucessfully.\n\nUsage\n-----\n\n```\nusage: Leaderf[!] [-h] [--reverse] [--stayOpen] [--input \u003cINPUT\u003e | --cword]\n                  [--top | --bottom | --left | --right | --belowright | --aboveleft | --fullScreen | --popup]\n                  [--nameOnly | --fullPath | --fuzzy | --regexMode] [--nowrap] [--next | --previous]\n                  [--recall] [--popup-height \u003cPOPUP_HEIGHT\u003e] [--popup-width \u003cPOPUP_WIDTH\u003e] [--no-sort]\n                  [--case-insensitive] [--auto-preview | --no-auto-preview]\n                  \n                  {file,tag,function,mru,searchHistory,cmdHistory,help,line,colorscheme,gtags,\n                      self,bufTag,buffer,rg,filetype,command,window,quickfix,loclist,jumps}\n                  ...\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --reverse             show results in bottom-up order\n  --stayOpen            don't quit LeaderF after accepting an entry\n  --input \u003cINPUT\u003e       specifies INPUT as the pattern inputted in advance\n  --cword               current word under cursor is inputted in advance\n  --top                 the LeaderF window is at the top of the screen\n  --bottom              the LeaderF window is at the bottom of the screen\n  --left                the LeaderF window is at the left of the screen\n  --right               the LeaderF window is at the right of the screen\n  --belowright          the LeaderF window is at the belowright of the screen\n  --aboveleft           the LeaderF window is at the aboveleft of the screen\n  --fullScreen          the LeaderF window takes up the full screen\n  --popup               the LeaderF window is a popup window or floating window\n  --nameOnly            LeaderF is in NameOnly mode by default\n  --fullPath            LeaderF is in FullPath mode by default\n  --fuzzy               LeaderF is in Fuzzy mode by default\n  --regexMode           LeaderF is in Regex mode by default\n  --nowrap              long lines in the LeaderF window won't wrap\n  --next                Jump to the next result.\n  --previous            Jump to the previous result.\n  --recall              Recall last search. If the result window is closed, reopen it.\n  --popup-height \u003cPOPUP_HEIGHT\u003e\n                        specifies the maximum height of popup window, only available in popup mode.\n  --popup-width \u003cPOPUP_WIDTH\u003e\n                        specifies the width of popup window, only available in popup mode.\n  --no-sort             do not sort the result.\n  --case-insensitive    fuzzy search case insensitively.\n  --auto-preview        open preview window automatically.\n  --no-auto-preview     don't open preview window automatically.\n\nsubcommands:\n\n  {file,tag,function,mru,searchHistory,cmdHistory,help,line,colorscheme,gtags,\n      self,bufTag,buffer,rg,filetype,command,window,quickfix,loclist,jumps}\n    file                search files\n    tag                 navigate tags using the tags file\n    function            navigate functions or methods in the buffer\n    mru                 search most recently used files\n    searchHistory       execute the search command in the history\n    cmdHistory          execute the command in the history\n    help                navigate the help tags\n    line                search a line in the buffer\n    colorscheme         switch between colorschemes\n    gtags               navigate tags using the gtags\n    self                execute the commands of itself\n    bufTag              navigate tags in the buffer\n    buffer              search buffers\n    rg                  grep using rg\n    filetype            navigate the filetype\n    command             execute built-in/user-defined Ex commands.\n    window              search windows.\n    quickfix            navigate the quickfix.\n    loclist             navigate the location list.\n\nIf [!] is given, enter normal mode directly.\n```\n\nuse `:Leaderf \u003csubcommand\u003e -h` to get specific help of subcommand, e.g., `:Leaderf rg -h`.\n\nOnce LeaderF is launched:\n\n| Command                    | Description\n| -------                    | -----------\n| `\u003cC-C\u003e`\u003cbr\u003e`\u003cESC\u003e`         | quit from LeaderF\n| `\u003cC-R\u003e`                    | switch between fuzzy search mode and regex mode\n| `\u003cC-F\u003e`                    | switch between full path search mode and name only search mode\n| `\u003cTab\u003e`                    | switch to normal mode\n| `\u003cC-V\u003e`\u003cbr\u003e`\u003cS-Insert\u003e`    | paste from clipboard\n| `\u003cC-U\u003e`                    | clear the prompt\n| `\u003cC-W\u003e`                    | delete the word before the cursor in the prompt\n| `\u003cC-J\u003e`                    | move the cursor downward in the result window\n| `\u003cC-K\u003e`                    | move the cursor upward in the result window\n| `\u003cUp\u003e`/`\u003cDown\u003e`            | recall last/next input pattern from history\n| `\u003c2-LeftMouse\u003e`\u003cbr\u003e`\u003cCR\u003e`  | open the file under cursor or selected(when multiple files are selected)\n| `\u003cC-X\u003e`                    | open in horizontal split window\n| `\u003cC-]\u003e`                    | open in vertical split window\n| `\u003cC-T\u003e`                    | open in new tabpage\n| `\u003cC-\\\u003e`                    | show a prompt enable to choose split window method: vertical, horizontal, tabpage, etc\n| `\u003cF5\u003e`                     | refresh the cache\n| `\u003cC-LeftMouse\u003e`\u003cbr\u003e`\u003cC-S\u003e` | select multiple files\n| `\u003cS-LeftMouse\u003e`            | select consecutive multiple files\n| `\u003cC-A\u003e`                    | select all files\n| `\u003cC-L\u003e`                    | clear all selections\n| `\u003cBS\u003e`                     | delete the preceding character in the prompt\n| `\u003cDel\u003e`                    | delete the current character in the prompt\n| `\u003cHome\u003e`                   | move the cursor to the begin of the prompt\n| `\u003cEnd\u003e`                    | move the cursor to the end of the prompt\n| `\u003cLeft\u003e`                   | move the cursor one character to the left in the prompt\n| `\u003cRight\u003e`                  | move the cursor one character to the right in the prompt\n| `\u003cC-P\u003e`                    | preview the result\n| `\u003cC-Up\u003e`                   | scroll up in the popup preview window\n| `\u003cC-Down\u003e`                 | scroll down in the popup preview window\n\nInput formats:\n\n * In **NameOnly** mode (*fuzzy mode*)\n\n    If the first character you input is `';'`, then the searching will be the same as in **FullPath** mode.\u003cbr\u003e\n    If you input string as `'abc;def'`, then `'abc'` will match the file name and `'def'` will match the directory name.\n\n * In **FullPath** mode (*fuzzy mode*)\n\n    Same as in **NameOnly** mode except that the pattern will match the full path but not the file name only.\n\n * In **Regexp** mode\n\n    The input string is the same as the Vim's regexp.\n\nSmart Case:\n\n * If the characters in search pattern are all lowercase, the matching is case-insensitive. If the search pattern contains uppercase characters, all lowercase characters still are matched case-insensitively, the uppercase characters can only match upper case. So uppercase characters can speed up the narrowing down of the searching result.  \n\n    e.g., input `abcDef`，it can match the following strings:\n    ```\n    abcDef\n    AbcDef\n    abcDEf\n    aBcDeF\n    ```\n    but can not match the strings such as:\n    ```\n    abcdef\n    Abcdef\n    ```\n    Note: `abc` and `ef` are still case-insensitive.\n\nAnd operator:\n\n * In fuzzy mode, using `' '`(space) as the **and** operator, the candidate lines should fuzzily match all the substrings separated by space.\n\n    e.g., input `abc def gh`，it can match the following strings:\n    ```\n    ...a.b.c...d.e.f...g.h...\n    ...a.b.c...g.h...d.e.f...\n    ...a.d..e.g.b.c...h..f...\n    ...gh...def...abc...\n    ```\n\nPopup Mode\n----------\n\nPopup Mode is to open LeaderF in a popup window(vim 8.1.1615+) or floating window(nvim 0.4.2+). \n\nTo enable popup mode:  \n```vim\nlet g:Lf_WindowPosition = 'popup'\n```  \nor add `--popup` after each subcommand, e.g.,  \n```\nLeaderf file --popup\n```\n\nCustomization\n-------------\n\n * Change key bindings\n\n    By default, `\u003cUp\u003e` and `\u003cDown\u003e` are used to recall last/next input pattern from history. If you want to use them to navigate the result list just like `\u003cC-K\u003e` and `\u003cC-J\u003e` :\n\n    `let g:Lf_CommandMap = {'\u003cC-K\u003e': ['\u003cUp\u003e'], '\u003cC-J\u003e': ['\u003cDown\u003e']}`\n\n    for more detail, please refer to `:h g:Lf_CommandMap`.\n\n * Change the colors used in LeaderF\n\n    ```vim\n    let g:Lf_PopupPalette = {\n        \\  'light': {\n        \\      'Lf_hl_match': {\n        \\                'gui': 'NONE',\n        \\                'font': 'NONE',\n        \\                'guifg': 'NONE',\n        \\                'guibg': '#303136',\n        \\                'cterm': 'NONE',\n        \\                'ctermfg': 'NONE',\n        \\                'ctermbg': '236'\n        \\              },\n        \\      'Lf_hl_cursorline': {\n        \\                'gui': 'NONE',\n        \\                'font': 'NONE',\n        \\                'guifg': 'NONE',\n        \\                'guibg': '#303136',\n        \\                'cterm': 'NONE',\n        \\                'ctermfg': 'NONE',\n        \\                'ctermbg': '236'\n        \\              },\n        \\      },\n        \\  'dark': {\n        \\         ...\n        \\         ...\n        \\      }\n        \\  }\n    ```\n    All the highlight groups supported are defined in\n    [LeaderF/autoload/leaderf/colorscheme/popup/default.vim](https://github.com/Yggdroot/LeaderF/blob/master/autoload/leaderf/colorscheme/popup/default.vim).\n\n * Change the default mapping of searching files command\n\n    e.g. `let g:Lf_ShortcutF = '\u003cC-P\u003e'`\n\n * Show icons (should install fonts from https://github.com/ryanoasis/nerd-fonts)\n\n    Support commands: buffer,file,mru,window\n\n    ```vim\n    \" Show icons, icons are shown by default\n    let g:Lf_ShowDevIcons = 1\n    \" For GUI vim, the icon font can be specify like this, for example\n    let g:Lf_DevIconsFont = \"DroidSansM Nerd Font Mono\"\n    \" If needs\n    set ambiwidth=double\n    ```\n\n    \nConfiguration examples\n----------------------\n\n```vim\n\" don't show the help in normal mode\nlet g:Lf_HideHelp = 1\nlet g:Lf_UseCache = 0\nlet g:Lf_UseVersionControlTool = 0\nlet g:Lf_IgnoreCurrentBufferName = 1\n\" popup mode\nlet g:Lf_WindowPosition = 'popup'\nlet g:Lf_StlSeparator = { 'left': \"\\ue0b0\", 'right': \"\\ue0b2\", 'font': \"DejaVu Sans Mono for Powerline\" }\nlet g:Lf_PreviewResult = {'Function': 0, 'BufTag': 0 }\n\nlet g:Lf_ShortcutF = \"\u003cleader\u003eff\"\nnoremap \u003cleader\u003efb :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf buffer %s\", \"\")\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efm :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf mru %s\", \"\")\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003eft :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf bufTag %s\", \"\")\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efl :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf line %s\", \"\")\u003cCR\u003e\u003cCR\u003e\n\nnoremap \u003cC-B\u003e :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! rg --current-buffer -e %s \", expand(\"\u003ccword\u003e\"))\u003cCR\u003e\nnoremap \u003cC-F\u003e :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! rg -e %s \", expand(\"\u003ccword\u003e\"))\u003cCR\u003e\n\" search visually selected text literally\nxnoremap gf :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! rg -F -e %s \", leaderf#Rg#visual())\u003cCR\u003e\nnoremap go :\u003cC-U\u003eLeaderf! rg --recall\u003cCR\u003e\n\n\" should use `Leaderf gtags --update` first\nlet g:Lf_GtagsAutoGenerate = 0\nlet g:Lf_Gtagslabel = 'native-pygments'\nnoremap \u003cleader\u003efr :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! gtags -r %s --auto-jump\", expand(\"\u003ccword\u003e\"))\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efd :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! gtags -d %s --auto-jump\", expand(\"\u003ccword\u003e\"))\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efo :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf! gtags --recall %s\", \"\")\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efn :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf gtags --next %s\", \"\")\u003cCR\u003e\u003cCR\u003e\nnoremap \u003cleader\u003efp :\u003cC-U\u003e\u003cC-R\u003e=printf(\"Leaderf gtags --previous %s\", \"\")\u003cCR\u003e\u003cCR\u003e\n```\n\nFAQ\n---\n\nhttps://github.com/Yggdroot/LeaderF/issues?q=label%3AFAQ+\n\nLicense\n-------\n\nThis plugin is released under the Apache License, Version 2.0 (the \"License\").\n\n:heart: Sponsor\n-------\n\nIf you like this software, please consider buying me a coffee.  \nhttps://github.com/Yggdroot/SponsorMe/blob/main/README.md#donate\n(捐赠的朋友最好备注一下自己的ID）\n\n  [1]: https://github.com/Yggdroot/Images/blob/master/leaderf/leaderf_popup.gif\n  [2]: https://github.com/Yggdroot/Images/blob/master/leaderf/leaderf_2.gif\n  [3]: https://github.com/gmarik/Vundle.vim\n  [4]: https://github.com/Yggdroot/LeaderF/blob/master/doc/leaderf.txt#L189-L349\n  [5]: https://github.com/junegunn/vim-plug\n  [6]: https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYggdroot%2FLeaderF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYggdroot%2FLeaderF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYggdroot%2FLeaderF/lists"}