fzf: Ctrl-T not working in tmux

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Hi all,

I’ve installed fzf keybindings. Ctrl-T doesn’t seem to work in a tmux session. I tested this on MacOS and on Linux, and with and without my fzf bash setup posted below.

The other keybindings work. How can I make Ctrl-T work in tmux? I am not using the fzf-tmux script.

Here is my fzf bash setup:

## fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_OPTS='--height 50% --border'
export FZF_DEFAULT_COMMAND='fd --type f'
# Use fd
_fzf_compgen_path() {
    fd --hidden --follow --exclude ".git" . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
    fd --type d --hidden --follow --exclude ".git" . "$1"
}
# Fuzzy complete using fzf
complete -F _fzf_path_completion -o default -o bashdefault ag
complete -F _fzf_dir_completion -o default -o bashdefault tree

# fasd & fzf change directory - jump using `fasd` if given argument, else filter output of
# `fasd` using `fzf`
_z() {
    [ $# -gt 0 ] && fasd_cd -d "$*" && return
    local dir
    dir="$(fasd -Rdl "$1" | fzf -1 -0 --no-sort +m)" && cd "${dir}" || return 1
}
alias z="_z"
alias fzfprev="fzf --preview 'head -100 {}'"

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 18 (1 by maintainers)

Most upvoted comments

I had the same issue, but it turned out to be because of an old tmux session. Killing it and starting a fresh one resolved the problem.

for anybody reading this, solution for @MeisterTea https://github.com/tmux/tmux/issues/1694#issuecomment-487935184

most likely u have the emacs binding setting after loading fzf bindings. in your bashrc, try moving set -o emacs after sourcing of the fzf bindings script