Update installation instruction

Close #1707
Close #1779
This commit is contained in:
Junegunn Choi 2019-12-05 23:03:46 +09:00
parent 6e6340a0c9
commit a59e846f74
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

127
README.md
View File

@ -25,15 +25,9 @@ Table of Contents
* [Installation](#installation) * [Installation](#installation)
* [Using Homebrew or Linuxbrew](#using-homebrew-or-linuxbrew) * [Using Homebrew or Linuxbrew](#using-homebrew-or-linuxbrew)
* [Using git](#using-git) * [Using git](#using-git)
* [As Vim plugin](#as-vim-plugin)
* [Using Linux package managers](#using-linux-package-managers) * [Using Linux package managers](#using-linux-package-managers)
* [Arch Linux](#arch-linux)
* [Debian](#debian)
* [Fedora](#fedora)
* [FreeBSD](#freebsd)
* [NixOS](#nixos)
* [openSUSE](#opensuse)
* [Windows](#windows) * [Windows](#windows)
* [As Vim plugin](#as-vim-plugin)
* [Upgrading fzf](#upgrading-fzf) * [Upgrading fzf](#upgrading-fzf)
* [Building fzf](#building-fzf) * [Building fzf](#building-fzf)
* [Usage](#usage) * [Usage](#usage)
@ -108,10 +102,45 @@ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install ~/.fzf/install
``` ```
### Using Linux package managers
| Distro | Command |
| --- | --- |
| Alpine Linux | `sudo apk add fzf` |
| Arch Linux | `sudo pacman -S fzf` |
| Debian | `sudo apt-get install fzf` |
| Fedora | `sudo dnf install fzf` |
| FreeBSD | `pkg install fzf` |
| NixOS | `nix-env -iA nixpkgs.fzf` |
| openSUSE | `sudo zypper install fzf` |
Shell extensions (key bindings and fuzzy auto-completion) and Vim/Neovim
plugin may or may not be enabled by default depending on the package manager.
Refer to the package documentation for more information.
### Windows
Pre-built binaries for Windows can be downloaded [here][bin]. fzf is also
available via [Chocolatey][choco] and [Scoop][scoop]:
| Package manager | Command |
| --- | --- |
| Chocolatey | `choco install fzf` |
| Scoop | `scoop install fzf` |
[choco]: https://chocolatey.org/packages/fzf
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/fzf.json
Known issues and limitations on Windows can be found on [the wiki
page][windows-wiki].
[windows-wiki]: https://github.com/junegunn/fzf/wiki/Windows
### As Vim plugin ### As Vim plugin
Once you have fzf installed, you can enable it inside Vim simply by adding the Once you have fzf installed, you can enable it inside Vim simply by adding the
directory to `&runtimepath` in your Vim configuration file as follows: directory to `&runtimepath` in your Vim configuration file. The path may
differ depending on the package manager.
```vim ```vim
" If installed using Homebrew " If installed using Homebrew
@ -143,88 +172,6 @@ Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" and you don't have to run the install script if you use fzf only in Vim. " and you don't have to run the install script if you use fzf only in Vim.
``` ```
### Using Linux package managers
#### Arch Linux
```sh
sudo pacman -S fzf
```
#### Debian
fzf is available in Debian Buster and above, and can be installed using the usual
method:
```sh
sudo apt-get install fzf
```
Read the documentation (`/usr/share/doc/fzf/README.Debian`) on how to enable
it.
#### Fedora
fzf is available in Fedora 26 and above, and can be installed using the usual
method:
```sh
sudo dnf install fzf
```
Shell completion and plugins for vim or neovim are enabled by default. Shell
key bindings are installed but not enabled by default. See Fedora's package
documentation (`/usr/share/doc/fzf/README.Fedora`) for more information.
#### FreeBSD
```sh
pkg install fzf
```
#### NixOS
You can use the [Nix package manager](https://nixos.org/nix/) to install fzf.
```sh
nix-env -iA nixpkgs.fzf
```
#### openSUSE
fzf is available in openSUSE Tumbleweed and can be installed via zypper:
```sh
sudo zypper install fzf
```
### Windows
Pre-built binaries for Windows can be downloaded [here][bin]. fzf is also
available as a [Chocolatey package][choco]:
[choco]: https://chocolatey.org/packages/fzf
```sh
choco install fzf
```
or a [Scoop package][scoop]:
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/fzf.json
```sh
scoop install fzf
```
However, other components of the project may not work on Windows. Known issues
and limitations can be found on [the wiki page][windows-wiki]. You might want
to consider installing fzf on [Windows Subsystem for Linux][wsl] where
everything runs flawlessly.
[windows-wiki]: https://github.com/junegunn/fzf/wiki/Windows
[wsl]: https://blogs.msdn.microsoft.com/wsl/
Upgrading fzf Upgrading fzf
------------- -------------