bash, zsh, and fish key bindings for tmux objects, powered by fzf.
Each binding will allow you to browse through tmux objects of a certain type, and select the objects you want to paste to your command-line.
- Install the latest version of fzf
- Update your shell configuration file
- bash or zsh
- Source fzf-tmux.sh file from your .bashrc or .zshrc
- fish
- Source fzf-tmux.fish from your config.fish
- bash or zsh
- CTRL-X? to show this list
- CTRL-XCTRL-F to Find tmux pane words
- CTRL-XCTRL-L for tmux pane Lines
Warning
If zsh's KEYTIMEOUT is too small (e.g. 1), you may not be able
to hit two keys in time.
- TAB or SHIFT-TAB to select multiple objects
- CTRL-/ to change preview window layout
# Redefine this function to change the options
_fzf_tmux_fzf() {
fzf --height 50% --tmux 90%,70% \
--layout reverse --multi --min-height 20+ --border \
--no-separator --header-border horizontal \
--border-label-pos 2 \
--color 'label:blue' \
--preview-window 'right,50%' --preview-border line \
--bind 'ctrl-/:change-preview-window(down,50%|hidden|)' "$@"
}Alternatively, set the $FZF_TMUX_DEFAULT_OPTS environment variable to change
options. Note that this is the only way to change options in fish.
Each binding is backed by _fzf_tmux_* function so you can do something like
this in your shell configuration file.
tl() {
_fzf_tmux_fpane_words
}
tw() {
cd "$(_fzf_tmux_lpane_lines)"
}In fish, each binding is backed by _fzf_tmux_* so you can do something
like this this in your shell configuration file.
function tw
_fzf_tmux_fpane_words
end
function tsl
cd (_fzf_tmux_lpane_lines)
end| Variable | Description | Default |
|---|---|---|
BAT_STYLE |
Specifies the style for displaying files using bat |
full |
FZF_TMUX_DEFAULT_OPTS |
Specifies the default options for _fzf_tmux_fzf |