summaryrefslogtreecommitdiffstats
path: root/README-VIM.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-04-05 18:14:05 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-04-05 18:16:36 +0900
commit71e573d082ee4f0ee3935517d34e0556d81435d7 (patch)
treeefadd8083e12dcb8a5a35223d9ca3e7884aff604 /README-VIM.md
parent334a4fa15920b08f7be2432398e620587cc6f079 (diff)
[vim] Add 'tmux' layout option to use fzf-tmux
e.g. if exists('$TMUX') let g:fzf_layout = { 'tmux': '-p90%,60%' } else let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } endif
Diffstat (limited to 'README-VIM.md')
-rw-r--r--README-VIM.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/README-VIM.md b/README-VIM.md
index a795d8e2..6c936b11 100644
--- a/README-VIM.md
+++ b/README-VIM.md
@@ -274,7 +274,8 @@ The following table summarizes the available options.
| `options` | string/list | Options to fzf |
| `dir` | string | Working directory |
| `up`/`down`/`left`/`right` | number/string | (Layout) Window position and size (e.g. `20`, `50%`) |
-| `window` (Vim 8 / Neovim) | string | (Layout) Command to open fzf window (e.g. `vertical aboveleft 30new`) |
+| `tmux` | string | (Layout) fzf-tmux options (e.g. `-p90%,60%`) |
+j `window` (Vim 8 / Neovim) | string | (Layout) Command to open fzf window (e.g. `vertical aboveleft 30new`) |
| `window` (Vim 8 / Neovim) | dict | (Layout) Popup window settings (e.g. `{'width': 0.9, 'height': 0.6}`) |
`options` entry can be either a string or a list. For simple cases, string
@@ -397,6 +398,18 @@ The latest versions of Vim and Neovim include builtin terminal emulator
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
```
+Alternatively, you can make fzf open in a tmux popup window (requires tmux 3.2
+or above) by putting fzf-tmux options in `tmux` key.
+
+```vim
+" See `man fzf-tmux` for available options
+if exists('$TMUX')
+ let g:fzf_layout = { 'tmux': '-p90%,60%' }
+else
+ let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
+endif
+```
+
#### Hide statusline
When fzf starts in a terminal buffer, the file type of the buffer is set to