I use this tmux-configuration based on the post from bartj3 in [1].
bind j split-window -v "tmux list-sessions -F '#S' | fzf --reverse | xargs tmux switch-client -t"
bind k split-window -v "tmux list-window -F '#W' | fzf --reverse | xargs tmux select-window -t"
It let's you interactively (search-as-you-type) search for other sessions and windows by name and therefore switch between them more efficiently.
PROBLEM:
If you use the above while synchronize-panes is on, your search key-strokes will also type in the other (non-search-)panes.
QUESTION:
Does anyone have an idea on how to limit the key-strokes to the search-pane?
Best Answer
You can save the current state of
synchronize-panes
before callingfzf
, and then restore it toon
afterwards if necessary. For example, this works for me, using bash as the default shell:Since this is a long shell command, it can be split over many lines provided they each end with a backslash, and shell semi-colons (;) are used as if it was all on one line. You might prefer to put this as a shell script in a file in your PATH and call it instead.