Clarify installation instructions
This commit is contained in:
parent
fc1b119159
commit
6b27554cdb
62
README.md
62
README.md
@ -23,8 +23,8 @@ Table of Contents
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
* [Using git](#using-git)
|
|
||||||
* [Using Homebrew or Linuxbrew](#using-homebrew-or-linuxbrew)
|
* [Using Homebrew or Linuxbrew](#using-homebrew-or-linuxbrew)
|
||||||
|
* [Using git](#using-git)
|
||||||
* [As Vim plugin](#as-vim-plugin)
|
* [As Vim plugin](#as-vim-plugin)
|
||||||
* [Fedora](#fedora)
|
* [Fedora](#fedora)
|
||||||
* [Windows](#windows)
|
* [Windows](#windows)
|
||||||
@ -74,20 +74,10 @@ stuff.
|
|||||||
|
|
||||||
[bin]: https://github.com/junegunn/fzf-bin/releases
|
[bin]: https://github.com/junegunn/fzf-bin/releases
|
||||||
|
|
||||||
### Using git
|
|
||||||
|
|
||||||
Clone this repository and run
|
|
||||||
[install](https://github.com/junegunn/fzf/blob/master/install) script.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
|
||||||
~/.fzf/install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using Homebrew or Linuxbrew
|
### Using Homebrew or Linuxbrew
|
||||||
|
|
||||||
Alternatively, you can use [Homebrew](http://brew.sh/) or
|
You can use [Homebrew](http://brew.sh/) or [Linuxbrew](http://linuxbrew.sh/)
|
||||||
[Linuxbrew](http://linuxbrew.sh/) to install fzf.
|
to install fzf.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install fzf
|
brew install fzf
|
||||||
@ -96,23 +86,49 @@ brew install fzf
|
|||||||
$(brew --prefix)/opt/fzf/install
|
$(brew --prefix)/opt/fzf/install
|
||||||
```
|
```
|
||||||
|
|
||||||
### As Vim plugin
|
### Using git
|
||||||
|
|
||||||
You can manually add the directory to `&runtimepath` as follows,
|
Alternatively, you can "git clone" this repository to any directory and run
|
||||||
|
[install](https://github.com/junegunn/fzf/blob/master/install) script.
|
||||||
|
|
||||||
```vim
|
```sh
|
||||||
" If installed using git
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
set rtp+=~/.fzf
|
~/.fzf/install
|
||||||
|
|
||||||
" If installed using Homebrew
|
|
||||||
set rtp+=/usr/local/opt/fzf
|
|
||||||
```
|
```
|
||||||
|
|
||||||
But it's recommended that you use a plugin manager like
|
### As Vim plugin
|
||||||
[vim-plug](https://github.com/junegunn/vim-plug).
|
|
||||||
|
Once you have fzf installed, you can enable it inside Vim simply by adding the
|
||||||
|
directory to `&runtimepath` as follows:
|
||||||
|
|
||||||
```vim
|
```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 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.
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" PlugInstall and PlugUpdate will clone fzf in ~/.fzf and run install script
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
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 install script if you use fzf only in Vim.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fedora
|
### Fedora
|
||||||
|
Loading…
Reference in New Issue
Block a user