Using fzf with tmux and zsh on Mac
I really like fzf when I use it, but it's actually difficult to use. For example, I don't want to type vim $(fzf)
every time I want to find a fuzzy find for a file. Ideally, I would like to just type ctrl-E
fzf for input and start editing the file after selecting it by hitting enter.
I don't know what keys are pressed to accomplish what is done in the video on the github page ( https://github.com/junegunn/fzf ). Clicking the tab just does normal autocomplete (and I don't want to do style autocomplete **
. I want to type fzf-tmux and paste the result into my command)
Can anyone help me?
source to share
the install script to install fzf such bindings for you CTRL-T
, CTRL-R
and ALT-C
. See the project home page for details . The code for key bindings can be found here .
If you don't like the standard fzf functions, you can try writing your own.
# A simple widget for dictionary words
fzf-dict-widget() {
LBUFFER="$LBUFFER$(cat /usr/share/dict/words | fzf-tmux -m | paste -sd" " -) "
zle reset-prompt
}
bindkey '^E' fzf-dict-widget
zle -N fzf-dict-widget
source to share