summaryrefslogtreecommitdiffstats
path: root/README-VIM.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-02-14 14:01:46 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-02-14 14:04:23 +0900
commit6c03571887cda7c0253c0a28439230cc8fcea3e6 (patch)
tree46fab9a995dd35e22e128a47420bfbd70a182ce4 /README-VIM.md
parent4fb410a93c6567cfae1a72e1581a3bd193cd307a (diff)
[vim] Add fzf#install() for downloading fzf binary
Diffstat (limited to 'README-VIM.md')
-rw-r--r--README-VIM.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/README-VIM.md b/README-VIM.md
index d178be35..6bf84fa7 100644
--- a/README-VIM.md
+++ b/README-VIM.md
@@ -1,6 +1,50 @@
FZF Vim integration
===================
+Installation
+------------
+
+Once you have fzf installed, you can enable it inside Vim simply by adding the
+directory to `&runtimepath` in your Vim configuration file. The path may
+differ depending on the package manager.
+
+```vim
+" If installed using Homebrew
+set rtp+=/usr/local/opt/fzf
+
+" If installed using git
+set rtp+=~/.fzf
+```
+
+If you use [vim-plug](https://github.com/junegunn/vim-plug), the same can be
+written as:
+
+```vim
+" If installed using Homebrew
+Plug '/usr/local/opt/fzf'
+
+" If installed using git
+Plug '~/.fzf'
+```
+
+But if you want the latest Vim plugin file from GitHub rather than the one
+included in the package, write:
+
+```vim
+Plug 'junegunn/fzf'
+```
+
+The Vim plugin will pick up fzf binary available on the system. If fzf is not
+found on `$PATH`, it will ask you if it should download the latest binary for
+you.
+
+To make sure that you have the latest version of the binary, set up
+post-update hook like so:
+
+```vim
+Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+```
+
Summary
-------