LeaderF is a Python fuzzy finder for Vim and Neovim that gets 10 times faster once you compile its C extension
An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
At a glance
- What is it?
- LeaderF finds files, buffers, MRU entries and gtags results from a prompt inside Vim or Neovim. This article covers the C extension that speeds up matching, the prompt syntax for fuzzy and regex search, popup mode and the version requirements that decide whether it runs at all.
- Who is it for?
- Use LeaderF if you want one in-editor picker for files, buffers, MRU and gtags with fuzzy and regex modes, and you are on Vim 7.4.1126 or newer or Neovim 0.5.0 or newer. Skip it if you want release tags to pin, since the repository has none.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.
Star history
- Yggdroot/LeaderF2,196 ★ · -2
| Repository | 2026-10-08 | 2026-11-23 |
|---|---|---|
| Yggdroot/LeaderF | 2.2k | 2.2k |
-2 Stars in the last 46 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The C extension makes matching more than 10 times faster, and installing it can fail
LeaderF is written in Python, and its fuzzy matching algorithm also exists as a C extension. The README says the plugin is already very fast without it, and that the extension is more than 10 times faster. Installing it is one Vim command:
:LeaderfInstallCExtensionThe command needs a working compiler setup. On Linux, Unix and MacOS the python2 and python3 commands must be available, and on Windows py -2 and py -3. Failures do happen during compilation, and the README tells you to search for the error message yourself. Its example is error: Unable to find vcvarsall.bat, which points to a missing Windows build toolchain.
To remove it:
:LeaderfUninstallCExtensionThere is a way to check that the extension loaded. After running any LeaderF command, run echo g:Lf_fuzzyEngine_C. A value of 1 means the C extension is active. Any other value means LeaderF has fallen back to Python matching, and nothing else on screen tells you.
One vim-plug line builds the extension at install time
The README gives one installation example, for vim-plug users:
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }The do option runs :LeaderfInstallCExtension after vim-plug installs or updates the plugin, so the C extension is compiled without a separate step. If the compile fails, the plugin itself is still installed and falls back to the Python implementation.
The README documents no other plugin manager. The top-level repository entries include install.sh and install.bat, which suggests scripts for a manual route, but the README does not describe them, so read them before running them. The layout of autoload/, plugin/, syntax/ and doc/ follows the standard Vim plugin structure, which means any manager that clones a repository into the runtime path can load it. That is an inference from the file layout and not a documented install route.
Vim 7.4.1126 is the floor and popup mode raises it to 8.1.1615
The requirements list has three lines, each with a sharp edge. First, vim7.3 or higher, but after v1.01 only 7.4.1126 and later are supported. Second, Python 2.7+ or Python 3.1+. Third, popup mode needs neovim 0.5.0+ or vim 8.1.1615+.
The popup section of the README gives slightly different numbers: a popup window on vim 8.1.1615+ or a floating window on nvim 0.4.2+. The requirement line says Neovim 0.5.0, the section says 0.4.2, so on Neovim 0.4.x test popup mode before depending on it.
The consequence is plain. A Vim built without Python support cannot run LeaderF at all, since the plugin is written in Python, and the README says nothing about a pure Vimscript fallback. Distribution Vim packages that ship without Python are a common reason a Python plugin does not load, so check :echo has('python3') before blaming the plugin.
Backspace-free prompt editing and a long list of prompt keys
Once LeaderF is launched, the prompt takes the commands in the README's table. Ctrl-C or Esc quits. Ctrl-R switches between fuzzy mode and regex mode. Ctrl-F switches between full path and name-only search. Tab drops into normal mode, so you can move around the result window with ordinary Vim motions.
Opening results has four routes: Enter or a double click opens in the current window, Ctrl-X splits horizontally, Ctrl-] splits vertically and Ctrl-T opens a new tabpage. Ctrl-backslash shows a prompt so you can pick the split method.
Multiple selection works with Ctrl-S or Ctrl-click, Shift-click for a consecutive range, Ctrl-A to select all and Ctrl-L to clear. F5 refreshes the cache, which matters for the file list on a changing tree.
One default catches people: Up and Down recall previous input patterns from history, they do not move through results. Ctrl-J and Ctrl-K move through results. The README shows how to swap them with g:Lf_CommandMap: let g:Lf_CommandMap = {'<C-K>': ['<Up>'], '<C-J>': ['<Down>']}.
Typing a semicolon switches NameOnly mode to a full path search
LeaderF has three input modes and each reads the prompt differently. In NameOnly fuzzy mode, the pattern matches file names. If the first character is a semicolon, the search behaves like FullPath mode. A pattern such as abc;def matches abc against the file name and def against the directory name, which narrows a search to one folder without leaving the prompt.
FullPath fuzzy mode works the same way, except the pattern is matched against the whole path. Regexp mode takes input in the same form as Vim's own regular expressions, so existing Vim regexp habits carry over.
The limit is that the three modes are exclusive, switched with Ctrl-R and Ctrl-F, and a single query cannot be both a regex and a path-and-name split. You choose which behaviour you want before typing.
Smart case and the space operator shape how a query narrows
Smart case works differently from the usual Vim setting. If the pattern is all lowercase, matching is case-insensitive. If it contains uppercase characters, only those uppercase characters match uppercase, while the lowercase ones stay case-insensitive. Typing abcDef matches abcDef, AbcDef, abcDEf and aBcDeF, but not abcdef or Abcdef, because the D must be uppercase. The README notes abc and ef remain case-insensitive. Adding an uppercase letter is therefore a quick way to cut down results.
In fuzzy mode, a space acts as an and operator. Each space-separated piece must fuzzily match the candidate, in any order. The pattern abc def gh matches ...a.b.c...d.e.f...g.h... and also ...gh...def...abc.... You can type the pieces in the order you remember them instead of the order they appear in the path.
A space does not stand for a literal space. A path that contains one needs regex mode, since fuzzy mode splits on it.
Popup mode is opt-in and configured by one variable or one flag
By default LeaderF opens a split window. Popup mode opens it in a popup window on Vim or a floating window on Neovim instead. Turn it on globally with:
let g:Lf_WindowPosition = 'popup'Or add the flag per command:
Leaderf file --popupThe usage line also lists the other layout flags: --top, --bottom, --left, --right, --belowright, --aboveleft and --fullScreen, plus --popup-height and --popup-width for size. Preview in the popup uses Ctrl-P, with Ctrl-Up and Ctrl-Down scrolling the preview window.
Colors are changeable through g:Lf_PopupPalette, which takes a nested dictionary with light and dark variants and highlight groups such as Lf_hl_match. The README is cut off partway through that example, so the full list of groups is in :h or the wiki.
The repository has no GitHub releases, and the last push was on 2026-04-30. The CHANGELOG.md in the repository is the only release history, so pin a commit instead of a tag if you need a reproducible setup.
Editorial conclusion
Use LeaderF if you want one in-editor picker for files, buffers, MRU and gtags with fuzzy and regex modes, and you are on Vim 7.4.1126 or newer or Neovim 0.5.0 or newer. Skip it if you want release tags to pin, since the repository has none. Run :LeaderfInstallCExtension first and confirm echo g:Lf_fuzzyEngine_C prints 1, because that decides how fast it feels.
Frequently asked questions
What is LeaderF?
LeaderF is a fuzzy finder written in Python that locates files, buffers, MRU entries and gtags results on the fly in Vim and Neovim. It supports fuzzy and regex searching.
How do I install the LeaderF C extension?
Run :LeaderfInstallCExtension, or use the vim-plug option { 'do': ':LeaderfInstallCExtension' }. Check echo g:Lf_fuzzyEngine_C afterwards, and a value of 1 means it loaded.
Which Vim and Neovim versions does LeaderF need?
Vim 7.4.1126 or higher, with Python 2.7+ or Python 3.1+. Popup mode needs Neovim 0.5.0+ or Vim 8.1.1615+.
How do I turn on LeaderF popup mode?
Set let g:Lf_WindowPosition = 'popup' in your vimrc, or add --popup after a subcommand such as Leaderf file --popup.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/yggdroot-leaderf)Star history chart for your README
[](https://hysenlabs.com/projects/yggdroot-leaderf)Was this useful?