fzy-master
所属分类:Windows编程
开发工具:WINDOWS
文件大小:59KB
下载次数:1
上传日期:2019-07-16 00:39:19
上 传 者:
jsmith473
说明: a new and imporoved fuzzy finder
文件列表:
.clang-format (136, 2019-02-03)
.travis.yml (292, 2019-02-03)
ALGORITHM.md (6784, 2019-02-03)
CHANGELOG.md (1682, 2019-02-03)
LICENSE (1080, 2019-02-03)
Makefile (1472, 2019-02-03)
contrib (0, 2019-02-03)
contrib\fzy-dvtm (1067, 2019-02-03)
contrib\fzy-tmux (1002, 2019-02-03)
deps (0, 2019-02-03)
deps\greatest (0, 2019-02-03)
deps\greatest\greatest.h (63878, 2019-02-03)
deps\greatest\package.json (263, 2019-02-03)
deps\theft (0, 2019-02-03)
deps\theft\LICENSE (751, 2019-02-03)
deps\theft\theft.c (15642, 2019-02-03)
deps\theft\theft.h (2449, 2019-02-03)
deps\theft\theft_bloom.c (4621, 2019-02-03)
deps\theft\theft_bloom.h (852, 2019-02-03)
deps\theft\theft_hash.c (1181, 2019-02-03)
deps\theft\theft_mt.c (4973, 2019-02-03)
deps\theft\theft_mt.h (1073, 2019-02-03)
deps\theft\theft_types.h (7220, 2019-02-03)
deps\theft\theft_types_internal.h (2587, 2019-02-03)
fzy.1 (2283, 2019-02-03)
src (0, 2019-02-03)
src\bonus.h (1841, 2019-02-03)
src\choices.c (7671, 2019-02-03)
src\choices.h (848, 2019-02-03)
src\config.def.h (506, 2019-02-03)
src\fzy.c (1567, 2019-02-03)
src\match.c (4447, 2019-02-03)
src\match.h (348, 2019-02-03)
src\options.c (3262, 2019-02-03)
src\options.h (391, 2019-02-03)
src\tty.c (3704, 2019-02-03)
... ...
![fzy](http://i.hawth.ca/u/fzy-github.svg)
**fzy** is a fast, simple fuzzy text selector for the terminal with an advanced scoring algorithm.
[Try it out online!](http://jhawthorn.github.io/fzy-demo)
![](http://i.hawth.ca/u/fzy_animated_demo.svg)
It's been kind of life-changing.
-@graygilmore
fzy works great btw
-@alexblackie
[![Build Status](https://travis-ci.org/jhawthorn/fzy.svg?branch=master)](https://travis-ci.org/jhawthorn/fzy)
## Why use this over fzf, pick, selecta, ctrlp, ...?
fzy is faster and shows better results than other fuzzy finders.
Most other fuzzy matchers sort based on the length of a match. fzy tries to
find the result the user intended. It does this by favouring matches on
consecutive letters and starts of words. This allows matching using acronyms or
different parts of the path.
A gory comparison of the sorting used by fuzzy finders can be found in [ALGORITHM.md](ALGORITHM.md)
fzy is designed to be used both as an editor plugin and on the command line.
Rather than clearing the screen, fzy displays its interface directly below the current cursor position, scrolling the screen if necessary.
## Installation
**macOS**
Using Homebrew
brew install fzy
Using MacPorts
sudo port install fzy
**[Arch Linux](https://www.archlinux.org/packages/?sort=&q=fzy&maintainer=&flagged=)/MSYS2**: `pacman -S fzy`
**[FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=fzy&stype=all)**: `pkg install fzy`
**[Gentoo Linux](https://packages.gentoo.org/packages/app-shells/fzy)**: `emerge -av app-shells/fzy`
**[Ubuntu](https://packages.ubuntu.com/search?keywords=fzy&searchon=names&suite=bionic§ion=all)/[Debian](https://packages.debian.org/search?keywords=fzy&searchon=names&suite=all§ion=all)**: `apt-get install fzy`
**[pkgsrc](http://pkgsrc.se/misc/fzy) (NetBSD and others)**: `pkgin install fzy`
**[openSUSE](https://software.opensuse.org/package/fzy)**: `zypper in fzy`
### From source
make
sudo make install
The `PREFIX` environment variable can be used to specify the install location,
the default is `/usr/local`.
## Usage
fzy is a drop in replacement for [selecta](https://github.com/garybernhardt/selecta), and can be used with its [usage examples](https://github.com/garybernhardt/selecta#usage-examples).
### Use with Vim
fzy can be easily integrated with vim.
``` vim
function! FzyCommand(choice_command, vim_command)
try
let output = system(a:choice_command . " | fzy ")
catch /Vim:Interrupt/
" Swallow errors from ^C, allow redraw! below
endtry
redraw!
if v:shell_error == 0 && !empty(output)
exec a:vim_command . ' ' . output
endif
endfunction
nnoremap
e :call FzyCommand("find . -type f", ":e")
nnoremap v :call FzyCommand("find . -type f", ":vs")
nnoremap s :call FzyCommand("find . -type f", ":sp")
```
Any program can be used to filter files presented through fzy. [ag (the silver searcher)](https://github.com/ggreer/the_silver_searcher) can be used to ignore files specified by `.gitignore`.
``` vim
nnoremap e :call FzyCommand("ag . --silent -l -g ''", ":e")
nnoremap v :call FzyCommand("ag . --silent -l -g ''", ":vs")
nnoremap s :call FzyCommand("ag . --silent -l -g ''", ":sp")
```
## Sorting
fzy attempts to present the best matches first. The following considerations are weighted when sorting:
It prefers consecutive characters: `file` will match file over filter.
It prefers matching the beginning of words: `amp` is likely to match app/models/posts.rb.
It prefers shorter matches: `abce` matches abcdef over abc de.
It prefers shorter candidates: `test` matches tests over testing.
## See Also
* [fzy.js](https://github.com/jhawthorn/fzy.js) Javascript port
近期下载者:
相关文件:
收藏者: