summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTom Picton <tom@tompicton.com>2021-04-17 04:48:10 -0700
committerGitHub <noreply@github.com>2021-04-17 20:48:10 +0900
commit8b0e1f941a419258b0877d9a5f71373d76472043 (patch)
treea95b57ee3888f119c381b21510f13d25002db165 /doc
parentc7c5e7670a9bccf5c7ba2b8dd3fa73135be2b734 (diff)
[vim] Support relative-to-window positioning of popup (#2443)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/fzf.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/fzf.txt b/doc/fzf.txt
index 43ebb1c4..ed8a9e3a 100644
--- a/doc/fzf.txt
+++ b/doc/fzf.txt
@@ -1,4 +1,4 @@
-fzf.txt fzf Last change: January 3 2021
+fzf.txt fzf Last change: April 17 2021
FZF - TABLE OF CONTENTS *fzf* *fzf-toc*
==============================================================================
@@ -155,9 +155,15 @@ Examples~
\ '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%' }
@@ -318,6 +324,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]`
@@ -372,7 +379,7 @@ last `fullscreen` argument of `fzf#wrap` (see :help <bang>).
Our `:LS` command will be much more useful if we can pass a directory argument
to it, so that something like `:LS /tmp` is possible.
>
- command! -bang -complete=dir -nargs=* LS
+ command! -bang -complete=dir -nargs=? LS
\ call fzf#run(fzf#wrap({'source': 'ls', 'dir': <q-args>}, <bang>0))
<
Lastly, if you have enabled `g:fzf_history_dir`, you might want to assign a
@@ -380,7 +387,7 @@ unique name to our command and pass it as the first argument to `fzf#wrap`.
>
" The query history for this command will be stored as 'ls' inside g:fzf_history_dir.
" The name is ignored if g:fzf_history_dir is not defined.
- command! -bang -complete=dir -nargs=* LS
+ command! -bang -complete=dir -nargs=? LS
\ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))
<
@@ -423,6 +430,7 @@ Starting fzf in a popup window~
" 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 } }