Skip to Content
Modern Vim
book

Modern Vim

by Drew Neil
May 2018
Intermediate to advanced
168 pages
4h 2m
English
Pragmatic Bookshelf
Content preview from Modern Vim
Tip 7Finding Files Using Fuzzy Path Matching

You can rely on Vim’s built-in :edit {filepath} command for opening any file on your file system, but specifying a filepath can require a lot of typing. Using a fuzzy finder can usually produce the same result with far fewer keystrokes.

Preparation

Vim users are spoiled for choice when it comes to fuzzy finder plugins. In this tip, you’ll be using Junegunn Choi’s excellent fzf tool.[20] This consists of two parts: a standalone fzf program, which you can run in your shell, and a Vim plugin, which depends upon the external program.

Installing and Configuring fzf

You can install the fzf repository to your bundle package like this:

=> $ cd $VIMCONFIG/pack/bundle/start
=> $ git clone https://github.com/junegunn/fzf ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Vim Masterclass

Vim Masterclass

Jason Cannon
Mastering Vim

Mastering Vim

Ruslan Osipov

Publisher Resources

ISBN: 9781680506006Errata Page