mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-10 15:50:56 +00:00
Update README
This commit is contained in:
parent
cf6f4d74c4
commit
8ef2420677
37
README.md
37
README.md
@ -10,18 +10,15 @@ Pros
|
|||||||
|
|
||||||
- No dependencies
|
- No dependencies
|
||||||
- Blazingly fast
|
- Blazingly fast
|
||||||
- e.g. `locate / | fzf`
|
|
||||||
- Flexible layout
|
|
||||||
- Runs in fullscreen or in horizontal/vertical split using tmux
|
|
||||||
- The most comprehensive feature set
|
- The most comprehensive feature set
|
||||||
- Try `fzf --help` and be surprised
|
- Flexible layout using tmux panes
|
||||||
- Batteries included
|
- Batteries included
|
||||||
- Vim/Neovim plugin, key bindings and fuzzy auto-completion
|
- Vim/Neovim plugin, key bindings and fuzzy auto-completion
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
fzf project consists of the following:
|
fzf project consists of the following components:
|
||||||
|
|
||||||
- `fzf` executable
|
- `fzf` executable
|
||||||
- `fzf-tmux` script for launching fzf in a tmux pane
|
- `fzf-tmux` script for launching fzf in a tmux pane
|
||||||
@ -30,12 +27,12 @@ fzf project consists of the following:
|
|||||||
- Fuzzy auto-completion (bash, zsh)
|
- Fuzzy auto-completion (bash, zsh)
|
||||||
- Vim/Neovim plugin
|
- Vim/Neovim plugin
|
||||||
|
|
||||||
You can [download fzf executable][bin] alone, but it's recommended that you
|
You can [download fzf executable][bin] alone if you don't need the extra
|
||||||
install the extra stuff using the attached install script.
|
stuff.
|
||||||
|
|
||||||
[bin]: https://github.com/junegunn/fzf-bin/releases
|
[bin]: https://github.com/junegunn/fzf-bin/releases
|
||||||
|
|
||||||
#### Using git (recommended)
|
### Using git
|
||||||
|
|
||||||
Clone this repository and run
|
Clone this repository and run
|
||||||
[install](https://github.com/junegunn/fzf/blob/master/install) script.
|
[install](https://github.com/junegunn/fzf/blob/master/install) script.
|
||||||
@ -45,7 +42,7 @@ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
|||||||
~/.fzf/install
|
~/.fzf/install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Using Homebrew
|
### Using Homebrew
|
||||||
|
|
||||||
On OS X, you can use [Homebrew](http://brew.sh/) to install fzf.
|
On OS X, you can use [Homebrew](http://brew.sh/) to install fzf.
|
||||||
|
|
||||||
@ -56,26 +53,30 @@ brew install fzf
|
|||||||
/usr/local/opt/fzf/install
|
/usr/local/opt/fzf/install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install as Vim plugin
|
### Vim plugin
|
||||||
|
|
||||||
Once you have cloned the repository, add the following line to your .vimrc.
|
You can manually add the directory to `&runtimepath` as follows,
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
" If installed using git
|
||||||
set rtp+=~/.fzf
|
set rtp+=~/.fzf
|
||||||
|
|
||||||
|
" If installed using Homebrew
|
||||||
|
set rtp+=/usr/local/opt/fzf
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can have [vim-plug](https://github.com/junegunn/vim-plug) manage fzf
|
But it's recommended that you use a plugin manager like
|
||||||
(recommended):
|
[vim-plug](https://github.com/junegunn/vim-plug).
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Upgrading fzf
|
### Upgrading fzf
|
||||||
|
|
||||||
fzf is being actively developed and you might want to upgrade it once in a
|
fzf is being actively developed and you might want to upgrade it once in a
|
||||||
while. Please follow the instruction below depending on the installation
|
while. Please follow the instruction below depending on the installation
|
||||||
method.
|
method used.
|
||||||
|
|
||||||
- git: `cd ~/.fzf && git pull && ./install`
|
- git: `cd ~/.fzf && git pull && ./install`
|
||||||
- brew: `brew update; brew reinstall fzf`
|
- brew: `brew update; brew reinstall fzf`
|
||||||
@ -390,6 +391,12 @@ fzf
|
|||||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you don't want to exclude hidden files, use the following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
|
||||||
|
```
|
||||||
|
|
||||||
#### `git ls-tree` for fast traversal
|
#### `git ls-tree` for fast traversal
|
||||||
|
|
||||||
If you're running fzf in a large git repository, `git ls-tree` can boost up the
|
If you're running fzf in a large git repository, `git ls-tree` can boost up the
|
||||||
|
@ -47,33 +47,6 @@ proportional to the number of CPU cores. On my MacBook Pro (Mid 2012), the new
|
|||||||
version was shown to be an order of magnitude faster on certain cases. It also
|
version was shown to be an order of magnitude faster on certain cases. It also
|
||||||
starts much faster though the difference may not be noticeable.
|
starts much faster though the difference may not be noticeable.
|
||||||
|
|
||||||
Differences with Ruby version
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
The Go version is designed to be perfectly compatible with the previous Ruby
|
|
||||||
version. The only behavioral difference is that the new version ignores the
|
|
||||||
numeric argument to `--sort=N` option and always sorts the result regardless
|
|
||||||
of the number of matches. The value was introduced to limit the response time
|
|
||||||
of the query, but the Go version is blazingly fast (almost instant response
|
|
||||||
even for 1M+ items) so I decided that it's no longer required.
|
|
||||||
|
|
||||||
System requirements
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Currently, prebuilt binaries are provided only for OS X and Linux. The install
|
|
||||||
script will fall back to the legacy Ruby version on the other systems, but if
|
|
||||||
you have Go 1.4 installed, you can try building it yourself.
|
|
||||||
|
|
||||||
However, as pointed out in [golang.org/doc/install][req], the Go version may
|
|
||||||
not run on CentOS/RHEL 5.x, and if that's the case, the install script will
|
|
||||||
choose the Ruby version instead.
|
|
||||||
|
|
||||||
The Go version depends on [ncurses][ncurses] and some Unix system calls, so it
|
|
||||||
shouldn't run natively on Windows at the moment. But it won't be impossible to
|
|
||||||
support Windows by falling back to a cross-platform alternative such as
|
|
||||||
[termbox][termbox] only on Windows. If you're interested in making fzf work on
|
|
||||||
Windows, please let me know.
|
|
||||||
|
|
||||||
Build
|
Build
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@ -88,17 +61,6 @@ make install
|
|||||||
make linux
|
make linux
|
||||||
```
|
```
|
||||||
|
|
||||||
Contribution
|
|
||||||
------------
|
|
||||||
|
|
||||||
For the time being, I will not add or accept any new features until we can be
|
|
||||||
sure that the implementation is stable and we have a sufficient number of test
|
|
||||||
cases. However, fixes for obvious bugs and new test cases are welcome.
|
|
||||||
|
|
||||||
I also care much about the performance of the implementation, so please make
|
|
||||||
sure that your change does not result in performance regression. And please be
|
|
||||||
noted that we don't have a quantitative measure of the performance yet.
|
|
||||||
|
|
||||||
Third-party libraries used
|
Third-party libraries used
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user