m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 00:53:42 -05:00

[vim] Add fzf#wrap helper function

Close #627
This commit is contained in:
Junegunn Choi
2016-07-26 02:35:40 +09:00
parent a7c9c08371
commit f787f7e651
3 changed files with 188 additions and 50 deletions

View File

@@ -320,10 +320,10 @@ customization.
[fzf-config]: https://github.com/junegunn/fzf/wiki/Configuring-FZF-command-(vim)
#### `fzf#run([options])`
#### `fzf#run`
For more advanced uses, you can use `fzf#run()` function with the following
options.
For more advanced uses, you can use `fzf#run([options])` function with the
following options.
| Option name | Type | Description |
| -------------------------- | ------------- | ---------------------------------------------------------------- |
@@ -342,6 +342,17 @@ options.
Examples can be found on [the wiki
page](https://github.com/junegunn/fzf/wiki/Examples-(vim)).
#### `fzf#wrap`
`fzf#wrap(name string, [opts dict, [fullscreen boolean]])` is a helper
function that decorates the options dictionary so that it understands
`g:fzf_layout`, `g:fzf_action`, and `g:fzf_history_dir` like `:FZF`.
```vim
command! -bang MyStuff
\ call fzf#run(fzf#wrap('my-stuff', {'dir': '~/my-stuff'}, <bang>0))
```
Tips
----