fzf.vim
fzf :heart: vim
A Vim and Neovim plugin that adds instant fuzzy-search commands for files, buffers, code lines, Git history, and more, powered by the fzf command-line tool.
fzf.vim is a plugin for the Vim and Neovim text editors that adds fuzzy-search commands throughout your editing workflow. Fuzzy searching means you can type a few characters from the middle of a filename, line of code, or command name, and the tool will find the best matches instantly, without needing to type the exact string or navigate menus manually.
The plugin builds on top of fzf, a general-purpose command-line fuzzy finder that runs separately from Vim. The fzf core is fast because it processes results asynchronously, and this plugin wraps it with a collection of ready-made Vim commands so you do not have to write them yourself.
The commands cover a wide range of things you commonly want to search. You can search open file buffers, all files in a directory, Git-tracked files, lines of code across all open files, code tags (named functions and variables), Git commit history, Vim command history, key mappings, color schemes, and more. Each command opens a floating or split window where you type to filter the list and press Enter to jump to your selection. Most commands also support keyboard shortcuts to open the result in a new tab or split.
Setting it up requires installing both the base fzf plugin and fzf.vim through a Vim plugin manager. Some commands depend on additional tools: the Ag and Rg commands require separate search programs called The Silver Searcher and ripgrep respectively, and the file preview feature works best with a syntax-highlighting tool called bat.
The plugin is customizable through a configuration dictionary in your Vim settings file, where you can adjust the preview window size and behavior, add a common prefix to all commands to avoid name conflicts, and tune how individual commands present their results.
Where it fits
- Instantly search and open any file in a large project by typing a few characters of its name.
- Search across all lines of open buffers to jump directly to a function definition or string.
- Browse Git commit history interactively and open any changed file from that commit.
- Fuzzy-search Vim key mappings and color schemes without leaving the editor.