An excerpt from the repository, fetched Nov 13, 2026.
Read the project’s introduction
fzf ❤️ vim
Things you can do with fzf and Vim.
Rationale
fzf itself is not a Vim plugin, and the official repository only
provides the basic wrapper function for Vim. It's up to the users to
write their own Vim commands with it. However, I've learned that many users of
fzf are not familiar with Vimscript and are looking for the "default"
implementation of the features they can find in the alternative Vim plugins.
Why you should use fzf on Vim
Because you can and you love fzf.
fzf runs asynchronously and can be orders of magnitude faster than similar Vim
plugins. However, the benefit may not be noticeable if the size of the input
is small, which is the case for many of the commands provided here.
Nevertheless I wrote them anyway since it's really easy to implement custom
selector with fzf.
Installation
fzf.vim depends on the basic Vim plugin of the main fzf
repository, which means you need to set up both "fzf" and
"fzf.vim" on Vim. To learn more about fzf/Vim integration, see
README-VIM.
Using vim-plug
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
fzf#install() makes sure that you have the latest binary, but it's optional,
so you can omit it if you use a plugin manager that doesn't support hooks.
Dependencies
fzf 0.54.0 or above
For syntax-highlighted preview, install bat
If delta is available, GF?,
Commits and BCommits will use it to format git diff output.
Ag requires The Silver Searcher (ag)
Rg requires ripgrep (rg)
Tags and Helptags require Perl
Tags PREFIX requires readtags command from Universal Ctags
# Installing dependencies using Homebrew
brew install fzf bat ripgrep the_silver_searcher perl universal-ctags
Commands
Command
List
:Files [PATH]
Files (runs $FZF_DEFAULT_COMMAND if defined)
:GFiles [OPTS]
Git files (git ls-files)
:GFiles?
Git files (git status)
:Buffers
Open buffers
:Colors
Color schemes
:Ag [PATTERN]
ag search result (ALT-A to select all, ALT-D to deselect all)
:Rg [PATTERN]
rg search result (ALT-A to select all, ALT-D to deselect all)
:RG [PATTERN]
rg search result; relaunch ripgrep on every keystroke
:Lines [QUERY]
Lines in loaded buffers
:BLines [QUERY]
Lines in the current buffer
:Tags [PREFIX]
Tags in the project (ctags -R)
:BTags [QUERY]
Tags in the current buffer
:Changes
Changelist across all open buffers
:Marks
Marks
:BMarks
Marks in the current buffer
:Jumps
Jumps
:Windows
Windows
:Locate PATTERN
locate command output
:History
v:oldfiles and open buffers
:History:
Command history
:History/
Search history
:Snippets
Snippets (UltiSnips)
:Commits [LOG_OPTS]
Git commits (requires fugitive.vim)
:BCommits [LOG_OPTS]
Git commits for the current buffer; visual-select lines to track changes in the range
:Commands
Commands
:Maps
Normal mode mappings
:Helptags
Help tags 1
:Filetypes
File types
Most commands support CTRL-T / CTRL-X / CTRL-V key
bindings to open in a new tab, a new split, or in a new vertical split
Most commands support ALT-ENTER to insert the selected items into the
current buffer instead of opening them. The inserted text depends on the
command: file path (:Files, :GFiles, :Buffers, :History, :Locate),
line content (:Lines, :BLines, :Marks, :Changes), matched text
(:Rg, :Ag, :Grep), tag name (:Tags, :BTags), or commit hash
(:Commits, :BCommits)
Most commands support CTRL-O to open the current entry in the window fzf
was started from, leaving fzf open, so you can look through several entries
in a single run (:Files, :GFiles, :GFiles?, :Buffers, :History,
:Locate, :Rg, :Ag, :Grep, :Lines, :BLines, :Tags, :BTags,
:Marks, :Changes, :Commits, :BCommits). Requires fzf 0.74.4 or
later, and is not offered in fullscreen mode, with a layout that leaves no
other window (enew, tabnew), on Windows, or when the key is already
used by g:fzf_vim.paste_key, g:fzf_action, or the command itself, as
CTRL-ALT-X is in :Buffers
Bang-versions of the commands (e.g. Ag!) will open fzf in fullscreen
You can set g:fzf_vim.command_prefix to give the same prefix to the commands
e.g. let g:fzf_vim.command_prefix = 'Fzf' and you have FzfFiles, etc.
(1: Helptags will shadow the command of the same name
from pathogen. But its functionality is still available via call pathogen#helptags(). ↩)
Customization
Configuration options of the base plugin
Every command in fzf.vim internally calls fzf#wrap function of the main
repository which supports a set of global option variables. So please read
through README-VIM to learn more about them.
Configuration options for fzf.vim
All configuration values for this plugin are stored in g:fzf_vim dictionary,
so make sure to initialize it before assigning any configuration values to
it.
" Initialize configuration dictionary
let g:fzf_vim = {}
Preview window
Some commands will show the preview window on the right. You can customize the
behavior with g:fzf_vim.preview_window. Here are some examples:
" This is the default option:
" - Preview window on the right with 50% width
" - CTRL-/ will toggle preview window.
" - Note that this array is passed as arguments to fzf#vim#with_preview function.
" - To learn more about preview window options, see `--preview-window` section of `man fzf`.
let g:fzf_vim.preview_window = ['right,50%', 'ctrl-/']
" Preview window is hidden by default. You can toggle it with ctrl-/.
" It will show on the right with 50% width, but if the width is smaller
" than 70 columns, it will show above the candidate list
let g:fzf_vim.preview_window = ['hidden,right,50%,<70(up,40%)', 'ctrl-/']
" Empty value to disable preview window altogether
let g:fzf_vim.preview_window = []
" fzf.vim needs bash to display the preview window.
" On Windows, fzf.vim will first see if bash is in $PATH, then if
" Git bash (C:\Program Files\Git\bin\bash.exe) is available.
" If you want it to use a different bash, set this variable.
" let g:fzf_vim = {}
" let g:fzf_vim.preview_bash = 'C:\Git\bin\bash.exe'
Paste key
Most commands support a key to inser
Read the full README on GitHub