diff --git a/README.md b/README.md index fca842b..6f39e88 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -fzf - a command-line fuzzy finder [![travis-ci](https://travis-ci.org/junegunn/fzf.svg?branch=master)](https://travis-ci.org/junegunn/fzf) +fzf - a command-line fuzzy finder [![travis-ci](https://travis-ci.org/junegunn/fzf.svg?branch=master)](https://travis-ci.org/junegunn/fzf) Flattr this === fzf is a general-purpose command-line fuzzy finder. @@ -16,7 +16,7 @@ Pros - The most comprehensive feature set - Try `fzf --help` and be surprised - Batteries included - - Vim plugin, key bindings and fuzzy auto-completion + - Vim/Neovim plugin, key bindings and fuzzy auto-completion Installation ------------ @@ -89,7 +89,7 @@ while. Please follow the instruction below depending on the installation method. - 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` Usage @@ -153,7 +153,8 @@ fish. - `CTRL-T` - Paste the selected file path(s) 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 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. Refer to the [this wiki -page](https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2) to see - -how to set up. +page](https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2) to see how +to set up. #### `fzf#run([options])` @@ -364,22 +364,22 @@ handy mapping that selects an open buffer. ```vim " List of buffers -function! BufList() +function! s:buflist() redir => ls silent ls redir END return split(ls, '\n') endfunction -function! BufOpen(e) - execute 'buffer '. matchstr(a:e, '^[ 0-9]*') +function! s:bufopen(e) + execute 'buffer' matchstr(a:e, '^[ 0-9]*') endfunction nnoremap :call fzf#run({ -\ 'source': reverse(BufList()), -\ 'sink': function('BufOpen'), +\ 'source': reverse(buflist()), +\ 'sink': function('bufopen'), \ 'options': '+m', -\ 'down': '40%' +\ 'down': len(buflist()) + 2 \ }) ```