diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-12-04 11:46:15 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-12-05 21:13:10 +0900 |
commit | 43f0d0cacde99ba5fdcc32d774cfd8849a6af2b5 (patch) | |
tree | 36a9b857991d9a1bb0a7c0789f5f54d6ed6d87ea /man | |
parent | 20b4e6953ec439f52e9bdcc06ac6ee5bb590d39d (diff) |
change-preview-window to take multiple option sets separated by '|'
So you can "rotate" through the different options with a single binding.
fzf --preview 'cat {}' \
--bind 'ctrl-/:change-preview-window(70%|down,40%,border-horizontal|hidden|)'
Close #2376
Diffstat (limited to 'man')
-rw-r--r-- | man/man1/fzf.1 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index c87d2c73..4920dbac 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -821,7 +821,7 @@ A key or an event can be bound to one or more of the following actions. \fBbeginning-of-line\fR \fIctrl-a home\fR \fBcancel\fR (clear query string if not empty, abort fzf otherwise) \fBchange-preview(...)\fR (change \fB--preview\fR option) - \fBchange-preview-window(...)\fR (change \fB--preview-window\fR option) + \fBchange-preview-window(...)\fR (change \fB--preview-window\fR option; rotate through the multiple option sets separated by '|') \fBchange-prompt(...)\fR (change prompt to the given string) \fBclear-screen\fR \fIctrl-l\fR \fBclear-selection\fR (clear multi-selection) @@ -972,7 +972,6 @@ commands in addition to the default preview command given by \fB--preview\fR option. e.g. - # Default preview command with an extra preview binding fzf --preview 'file {}' --bind '?:preview:cat {}' @@ -983,6 +982,22 @@ e.g. # Preview window hidden by default, it appears when you first hit '?' fzf --bind '?:preview:cat {}' --preview-window hidden +.SS CHANGE PREVIEW WINDOW ATTRIBUTES + +\fBchange-preview-window\fR action can be used to change the properties of the +preview window. Unlike the \fB--preview-window\fR option, you can specify +multiple sets of options separated by '|' characters. + +e.g. + # Rotate through the options using CTRL-/ + fzf --preview 'cat {}' --bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-horizontal|hidden|right)' + + # The default properties given by `--preview-window` are inherited, so an empty string in the list is interpreted as the default + fzf --preview 'cat {}' --preview-window 'right,40%,border-left' --bind 'ctrl-/:change-preview-window(70%|down,border-top|hidden|)' + + # This is equivalent to toggle-preview action + fzf --preview 'cat {}' --bind 'ctrl-/:change-preview-window(hidden|)' + .SH AUTHOR Junegunn Choi (\fIjunegunn.c@gmail.com\fR) |