diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-03-31 22:18:09 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-04-03 13:23:15 +0900 |
commit | bf65e8cd12b0477a916ed16fa6d9d3ff9a78c824 (patch) | |
tree | b2717ffe44d0d548a63359e5d18659bf6bb02a17 /README.md | |
parent | 0f5c6e8f040833ca632bb5ff345542879769225c (diff) |
[fzf-tmux] Add option to start fzf in tmux popup window
Requires latest tmux built from source (e.g. brew install tmux --HEAD)
Examples:
# 50%/50% width and height on the center of the screen
fzf-tmux -p
# 80%/80%
fzf-tmux -p80%
# 80%/40%
fzf-tmux -p80%,40%
# Separate -w and -h
fzf-tmux -w80% -h40%
# 80%/40% at position (0, 0)
fzf-tmux -w80% -h40% -x0 -y0
You can configure key bindings and fuzzy completion to open in tmux
popup window like so:
FZF_TMUX_OPTS='-p 80%'
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -281,8 +281,10 @@ own as well. [fzf-tmux](bin/fzf-tmux) is a bash script that opens fzf in a tmux pane. ```sh -# usage: fzf-tmux [-u|-d [HEIGHT[%]]] [-l|-r [WIDTH[%]]] [--] [FZF OPTIONS] -# (-[udlr]: up/down/left/right) +# usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS] + +# See available options +fzf-tmux --help # select git branches in horizontal split below (15 lines) git branch | fzf-tmux -d 15 @@ -291,7 +293,7 @@ git branch | fzf-tmux -d 15 cat /usr/share/dict/words | fzf-tmux -l 20% --multi --reverse ``` -It will still work even when you're not on tmux, silently ignoring `-[udlr]` +It will still work even when you're not on tmux, silently ignoring `-[pudlr]` options, so you can invariably use `fzf-tmux` in your scripts. Alternatively, you can use `--height HEIGHT[%]` option not to start fzf in @@ -318,9 +320,9 @@ fish. - Set `FZF_ALT_C_COMMAND` to override the default command - Set `FZF_ALT_C_OPTS` to pass additional options -If you're on a tmux session, you can start fzf in a split pane by setting -`FZF_TMUX` to 1, and change the height of the pane with `FZF_TMUX_HEIGHT` -(e.g. `20`, `50%`). +If you're on a tmux session, you can start fzf in a tmux split pane or in +a tmux popup window by setting `FZF_TMUX_OPTS` (e.g. `-d 40%`). +See `fzf-tmux --help` for available options. More tips can be found on [the wiki page](https://github.com/junegunn/fzf/wiki/Configuring-shell-key-bindings). |