mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 14:56:30 +00:00
Update README
This commit is contained in:
parent
8385a55bda
commit
797f42ecc6
26
README.md
26
README.md
@ -1,4 +1,4 @@
|
|||||||
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf.png" height="170" alt="fzf - a command-line fuzzy finder"> [![travis-ci](https://travis-ci.org/junegunn/fzf.svg?branch=master)](https://travis-ci.org/junegunn/fzf)
|
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf.png" height="170" alt="fzf - a command-line fuzzy finder"> [![travis-ci](https://travis-ci.org/junegunn/fzf.svg?branch=master)](https://travis-ci.org/junegunn/fzf) <a href="http://flattr.com/thing/3115381/junegunnfzf-on-GitHub" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
|
||||||
===
|
===
|
||||||
|
|
||||||
fzf is a general-purpose command-line fuzzy finder.
|
fzf is a general-purpose command-line fuzzy finder.
|
||||||
@ -16,7 +16,7 @@ Pros
|
|||||||
- The most comprehensive feature set
|
- The most comprehensive feature set
|
||||||
- Try `fzf --help` and be surprised
|
- Try `fzf --help` and be surprised
|
||||||
- Batteries included
|
- Batteries included
|
||||||
- Vim plugin, key bindings and fuzzy auto-completion
|
- Vim/Neovim plugin, key bindings and fuzzy auto-completion
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
@ -89,7 +89,7 @@ while. Please follow the instruction below depending on the installation
|
|||||||
method.
|
method.
|
||||||
|
|
||||||
- git: `cd ~/.fzf && git pull && ./install`
|
- git: `cd ~/.fzf && git pull && ./install`
|
||||||
- brew: `brew update && brew upgrade fzf && $(brew info fzf | grep /install)`
|
- brew: `brew reinstall --HEAD fzf`
|
||||||
- vim-plug: `:PlugUpdate fzf`
|
- vim-plug: `:PlugUpdate fzf`
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
@ -153,7 +153,8 @@ fish.
|
|||||||
|
|
||||||
- `CTRL-T` - Paste the selected file path(s) into the command line
|
- `CTRL-T` - Paste the selected file path(s) into the command line
|
||||||
- `CTRL-R` - Paste the selected command from history into the command line
|
- `CTRL-R` - Paste the selected command from history into the command line
|
||||||
- Sort is disabled by default. Press `CTRL-R` again to toggle sort.
|
- Sort is disabled by default to respect chronological ordering
|
||||||
|
- Press `CTRL-R` again to toggle sort
|
||||||
- `ALT-C` - cd into the selected directory
|
- `ALT-C` - cd into the selected directory
|
||||||
|
|
||||||
If you're on a tmux session, `CTRL-T` will launch fzf in a new split-window. You
|
If you're on a tmux session, `CTRL-T` will launch fzf in a new split-window. You
|
||||||
@ -301,9 +302,8 @@ let g:fzf_launcher = 'urxvt -geometry 120x30 -e sh -c %s'
|
|||||||
|
|
||||||
If you're running MacVim on OSX, I recommend you to use iTerm2 as the launcher.
|
If you're running MacVim on OSX, I recommend you to use iTerm2 as the launcher.
|
||||||
Refer to the [this wiki
|
Refer to the [this wiki
|
||||||
page](https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2) to see
|
page](https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2) to see how
|
||||||
|
to set up.
|
||||||
how to set up.
|
|
||||||
|
|
||||||
#### `fzf#run([options])`
|
#### `fzf#run([options])`
|
||||||
|
|
||||||
@ -364,22 +364,22 @@ handy mapping that selects an open buffer.
|
|||||||
|
|
||||||
```vim
|
```vim
|
||||||
" List of buffers
|
" List of buffers
|
||||||
function! BufList()
|
function! s:buflist()
|
||||||
redir => ls
|
redir => ls
|
||||||
silent ls
|
silent ls
|
||||||
redir END
|
redir END
|
||||||
return split(ls, '\n')
|
return split(ls, '\n')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! BufOpen(e)
|
function! s:bufopen(e)
|
||||||
execute 'buffer '. matchstr(a:e, '^[ 0-9]*')
|
execute 'buffer' matchstr(a:e, '^[ 0-9]*')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
||||||
\ 'source': reverse(BufList()),
|
\ 'source': reverse(<sid>buflist()),
|
||||||
\ 'sink': function('BufOpen'),
|
\ 'sink': function('<sid>bufopen'),
|
||||||
\ 'options': '+m',
|
\ 'options': '+m',
|
||||||
\ 'down': '40%'
|
\ 'down': len(<sid>buflist()) + 2
|
||||||
\ })<CR>
|
\ })<CR>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user