Multiple keybinds — library functions?
mcint opened this issue · comments
My primary use, that drove me to search for this, and quickly install it, is for a nicer filter list for pane searching (ideally including tmux's in-buffer search, when searching for panes). Something like tmux choose-tree -w
, #20. I'm tempted to restrict or set environment variable defaults, so I can, at one keypress, be interactively fzf filtering panes.
However this tool does a wonderful job to make visible the levels to make better and more full use of tmux. Session control and fzf filtering for keybinds improves on even the upgrades to tmux in version 2 when submit-query filtering of keybinds was made possible. I like these functions that you expose, and want to use them to make better use of all that tmux has to offer.
Does the tmux plugin paradigm support you defining a function where users could write their bindings calling to customized invocations of the function.
bind -n C-S-p tmux-fzf-call 'pane' 'switch' '*'
bind -n C-S-m tmux-fzf-call 'pane' 'switch|move' '*'
bind -n C-S-m tmux-fzf-call 'pane|window' 'create|switch|move' '*'
I want my 1 specialized bind invocation, for now. But I really like to have the API of tmux laid out as a series of choices, I can "choose from a set", which is a nicer problem than "remember the functions available, and their flags and arguments, and compose them correctly in a one-shot prompt line". Thank you!
Do you mean this: #6
Hmm, yes. Hmm, looks like it just supports pre-selecting individual options, not pre-winnowing. Looks like you've solved this. And well enough that it was your first response to another issue. Thank you! Guess I might still request it appear in the FAQ, even folded away.
It looks like scripts/window.sh
does not support using tmux's find-window
command. I find I'm already missing the filter on buffer contents, e.g. I often know the window I want by the directory, which appears in shell prompt, or other buffer text that tmux does not surface for searching in other ways. Possibly PR incoming.