summaryrefslogtreecommitdiffstats
path: root/README-VIM.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-10-18 13:06:51 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-10-18 13:23:40 +0900
commit305896fcb3b76c5ea94401f6cce74f0f287e8f21 (patch)
treeb498fd4e477f1bfd2b629a7c76d1f124ea02839f /README-VIM.md
parent6c9adea0d3eec72af9999ce291259c86ad8788e2 (diff)
README-VIM: g:fzf_action doesn't work with custom sink
Fix https://github.com/junegunn/fzf.vim/issues/1131
Diffstat (limited to 'README-VIM.md')
-rw-r--r--README-VIM.md24
1 files changed, 19 insertions, 5 deletions
diff --git a/README-VIM.md b/README-VIM.md
index 126862b2..568f723f 100644
--- a/README-VIM.md
+++ b/README-VIM.md
@@ -127,11 +127,13 @@ let g:fzf_action = {
\ 'ctrl-v': 'vsplit' }
" Default fzf layout
-" - down / up / left / right / window
-let g:fzf_layout = { 'down': '40%' }
+" - Popup window
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
-" You can set up fzf window using a Vim command (Neovim or latest Vim 8 required)
+" - down / up / left / right
+let g:fzf_layout = { 'down': '40%' }
+
+" - Window using a Vim command
let g:fzf_layout = { 'window': 'enew' }
let g:fzf_layout = { 'window': '-tabnew' }
let g:fzf_layout = { 'window': '10new' }
@@ -332,8 +334,9 @@ After we *"wrap"* our spec, we pass it to `fzf#run`.
call fzf#run(fzf#wrap({'source': 'ls'}))
```
-Now it supports `CTRL-T`, `CTRL-V`, and `CTRL-X` key bindings and it opens fzf
-window according to `g:fzf_layout` setting.
+Now it supports `CTRL-T`, `CTRL-V`, and `CTRL-X` key bindings (configurable
+via `g:fzf_action`) and it opens fzf window according to `g:fzf_layout`
+setting.
To make it easier to use, let's define `LS` command.
@@ -370,6 +373,17 @@ command! -bang -complete=dir -nargs=* LS
\ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))
```
+### Global options supported by `fzf#wrap`
+
+- `g:fzf_layout`
+- `g:fzf_action`
+ - **Works only when no custom `sink` (or `sink*`) is provided**
+ - Having custom sink usually means that each entry is not an ordinary
+ file path (e.g. name of color scheme), so we can't blindly apply the
+ same strategy (i.e. `tabedit some-color-scheme` doesn't make sense)
+- `g:fzf_colors`
+- `g:fzf_history_dir`
+
Tips
----