explaingit

junegunn/fzf.vim

10,189Vim ScriptAudience · developerComplexity · 2/5Setup · moderate

TLDR

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.

Mindmap

mindmap
  root((fzf.vim))
    What it does
      Fuzzy search in Vim
      Wraps fzf tool
    Search Targets
      Files and buffers
      Code lines
      Git history
      Key mappings
    Dependencies
      fzf core
      ripgrep
      bat preview
    Use Cases
      Quick file navigation
      Code search
    Setup
      Vim plugin manager
      Neovim compatible
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Instantly search and open any file in a large project by typing a few characters of its name.

USE CASE 2

Search across all lines of open buffers to jump directly to a function definition or string.

USE CASE 3

Browse Git commit history interactively and open any changed file from that commit.

USE CASE 4

Fuzzy-search Vim key mappings and color schemes without leaving the editor.

Tech stack

Vim Scriptfzfripgrepbat

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the fzf base plugin installed separately, some commands also need ripgrep and bat installed on the system.

No license information is mentioned in the explanation.

In plain English

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.

Copy-paste prompts

Prompt 1
I use fzf.vim in Neovim. Help me configure the preview window to show syntax-highlighted file previews using bat, and set a custom keyboard shortcut to open results in a vertical split.
Prompt 2
Set up fzf.vim so that Ctrl+P searches Git-tracked files and Ctrl+F searches all lines across open buffers. Show me the vimrc/init.vim config.
Prompt 3
I want to use fzf.vim's :Rg command with ripgrep to search only in TypeScript files. How do I configure that and bind it to a leader key shortcut?
Prompt 4
How do I add fzf.vim to my Neovim config using lazy.nvim, including the base fzf dependency and optional bat for preview?
Open on GitHub → Explain another repo

← junegunn on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.