I really love fzf except for the default key-bindings as I want the Bash/Emacs mappings. Especially:
Is there a way to change these?
This depends on the shell you're using, for example
zsh: https://github.com/junegunn/fzf/blob/b46227dcb6f1718d66ad828443d9f03a4bd58c4c/shell/key-bindings.zsh#L36
bash: https://github.com/junegunn/fzf/blob/b46227dcb6f1718d66ad828443d9f03a4bd58c4c/shell/key-bindings.bash#L75
You can just override these in your shell initialization files. For example, zsh's bindkey: https://github.com/eqyiel/dotfiles/blob/dff548627e65fd06a318de4d38f892768eaec1b0/nix/.config/nixpkgs/home/config/zsh/default.nix#L330-L337
CTRL-K functionality is available via kill-line action
fzf --bind ctrl-k:kill-line
If you use it a lot, you might want to add --bind option to your FZF_DEFAULTS_OPTS.
transpose-words is not needed since fzf doesn't care about the order of the search terms. i.e. foo bar and bar foo are treated the same. If you want foo to appear before bar, type in foobar instead.
transpose-chars is not available.
In which file should I put
fzf --bind ctrl-k:kill-line
?
Most helpful comment
CTRL-K functionality is available via
kill-lineactionIf you use it a lot, you might want to add
--bindoption to yourFZF_DEFAULTS_OPTS.transpose-wordsis not needed since fzf doesn't care about the order of the search terms. i.e.foo barandbar fooare treated the same. If you wantfooto appear beforebar, type infoobarinstead.transpose-charsis not available.