diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-14 14:01:46 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-14 14:04:23 +0900 |
commit | 6c03571887cda7c0253c0a28439230cc8fcea3e6 (patch) | |
tree | 46fab9a995dd35e22e128a47420bfbd70a182ce4 /README.md | |
parent | 4fb410a93c6567cfae1a72e1581a3bd193cd307a (diff) |
[vim] Add fzf#install() for downloading fzf binary
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 35 |
1 files changed, 7 insertions, 28 deletions
@@ -138,39 +138,18 @@ page][windows-wiki]. ### As Vim plugin -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. +If you use +[vim-plug](https://github.com/junegunn/vim-plug), add this line to your Vim +configuration file: ```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' +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } ``` -But instead of separately installing fzf on your system (using Homebrew or -"git clone") and enabling it on Vim (adding it to `&runtimepath`), you can use -vim-plug to do both. +`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. -```vim -" PlugInstall and PlugUpdate will clone fzf in ~/.fzf and run the install script -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } - " Both options are optional. You don't have to install fzf in ~/.fzf - " and you don't have to run the install script if you use fzf only in Vim. -``` +For more installation options, see [README-VIM.md](README-VIM.md). Upgrading fzf ------------- |