From f6c6e59a50d580595fd5117ab51b058988fc5f83 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 14 Jan 2016 02:35:43 +0900 Subject: Add toggle-in and toggle-out for --bind Related: #452 When `--multi` is set, tab key will bring your cursor down, and shift-tab up. But since fzf by default draws the screen in bottom-up fashion, one may feel that the opposite of the behavior is more desirable and choose to customize the key bindings as follows. export FZF_DEFAULT_OPTS="--bind tab:toggle-up,shift-tab:toggle-down" This configuration, however, becomes no longer straightforward when `--reverse` is set and fzf switches to top-down layout. To address the requirement, this commit adds `toggle-in` and `toggle-out` option which switch direction depending on `--reverse`-ness. export FZF_DEFAULT_OPTS="--bind tab:toggle-out,shift-tab:toggle-in" --- man/man1/fzf.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'man/man1/fzf.1') diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index feca9728..ba52f84c 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -219,7 +219,7 @@ e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR .RE .RS - \fBACTION: DEFAULT BINDINGS: + \fBACTION: DEFAULT BINDINGS (NOTES): \fBabort\fR \fIctrl-c ctrl-g ctrl-q esc\fR \fBaccept\fR \fIenter double-click\fR \fBbackward-char\fR \fIctrl-b left\fR @@ -249,6 +249,8 @@ e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR \fBtoggle\fR \fBtoggle-all\fR \fBtoggle-down\fR \fIctrl-i (tab)\fR + \fBtoggle-in\fR (\fB--reverse\fR ? \fBtoggle-up\fR : \fBtoggle-down\fR) + \fBtoggle-out\fR (\fB--reverse\fR ? \fBtoggle-down\fR : \fBtoggle-up\fR) \fBtoggle-sort\fR (equivalent to \fB--toggle-sort\fR) \fBtoggle-up\fR \fIbtab (shift-tab)\fR \fBunix-line-discard\fR \fIctrl-u\fR -- cgit v1.2.3