From 8b0e1f941a419258b0877d9a5f71373d76472043 Mon Sep 17 00:00:00 2001 From: Tom Picton Date: Sat, 17 Apr 2021 04:48:10 -0700 Subject: [vim] Support relative-to-window positioning of popup (#2443) Co-authored-by: Junegunn Choi --- README-VIM.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'README-VIM.md') diff --git a/README-VIM.md b/README-VIM.md index b934c232..b54c4fae 100644 --- a/README-VIM.md +++ b/README-VIM.md @@ -127,9 +127,15 @@ let g:fzf_action = { \ 'ctrl-v': 'vsplit' } " Default fzf layout -" - Popup window +" - Popup window (center of the screen) let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } +" - Popup window (center of the current window) +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true } } + +" - Popup window (anchored to the bottom of the current window) +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true, 'yoffset': 1.0 } } + " - down / up / left / right let g:fzf_layout = { 'down': '40%' } @@ -302,6 +308,7 @@ following options are allowed: - Optional: - `yoffset` [float default 0.5 range [0 ~ 1]] - `xoffset` [float default 0.5 range [0 ~ 1]] + - `relative` [boolean default v:false] - `border` [string default `rounded`]: Border style - `rounded` / `sharp` / `horizontal` / `vertical` / `top` / `bottom` / `left` / `right` / `no[ne]` @@ -410,6 +417,7 @@ The latest versions of Vim and Neovim include builtin terminal emulator " Optional: " - xoffset [float default 0.5 range [0 ~ 1]] " - yoffset [float default 0.5 range [0 ~ 1]] +" - relative [boolean default v:false] " - border [string default 'rounded']: Border style " - 'rounded' / 'sharp' / 'horizontal' / 'vertical' / 'top' / 'bottom' / 'left' / 'right' let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } -- cgit v1.2.3