diff --git a/Examples.md b/Examples.md index b63783e..1f83e95 100644 --- a/Examples.md +++ b/Examples.md @@ -41,11 +41,11 @@ Table of Contents * CLI Tools * [Git](#git) * [jrnl](#jrnl) + * [tmux](#tmux) * Moving from other tools * [fzf as rofi replacement](#fzf-as-rofi-replacement) * [fzf as dmenu replacement](#fzf-as-dmenu-replacement) * [ctags](#ctags) -* [tmux](#tmux) * [ASDF](#asdf) * [Images](#images) * [v](#v) @@ -891,6 +891,28 @@ ftpane() { To search for windows and show which is currently active, add [ftwind](https://github.com/pokey/dotfiles/blob/dade6c88af31458c323e8f0247af510bca7af0f5/bin/ftwind) somewhere in your path. Then add eg `bind-key f run -b ftwind` to your `tmux.conf`. +### Select pane + +Allows you to select pane with `bind-key + 0`. +Requires [`ftpane()` function](https://github.com/junegunn/fzf/wiki/Examples#tmux). + +```sh +# Index starts from 1 +set-option -g base-index 1 + +# select-pane (@george-b) +bind-key 0 run "tmux split-window -p 40 'bash -ci ftpane'" +``` + +### Search entire file system (ALT-`) + +ALT-` key will split the current window and start fzf for the entire list of files. The selected files will be pasted on to the original window. + +```sh +# fzf-locate +bind-key -n 'M-`' run "tmux split-window -p 40 'tmux send-keys -t #{pane_id} \"$(locate / | fzf -m | paste -sd\\ -)\"'" +``` + ### ASDF ```sh