|
|
|
@ -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
|
|
|
|
|
-------------
|
|
|
|
|